If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:
- What’s your URL? https://www.mifitnessfacil.com
- What version of Ghost are you using?
Ghost-CLI version: 1.11.0 Ghost version: 2.23.1 (at /var/www/ghost)
- What configuration?
productionshould I paste config.production.json content here?
- What browser?
all of them
- What errors or information do you see in the console?
502 Bad Gateway
- What steps could someone else take to reproduce the issue you’re having?
ssh into my digital ocean server via ssh:
Change to ghost-mgr user:
sudo -i -u ghost-mgr
go to ghost dir: `cd /var/www/ghost``
I stop running server successfully
then I start it again:
ghost startand get output:
✔ Ensuring user is not logged in as ghost user ✔ Checking if logged in user is directory owner ✔ Checking current folder permissions + sudo systemctl is-active ghost_mifitnessfacil-com ✔ Validating config ✔ Checking folder permissions ✔ Checking file permissions ✔ Checking content folder ownership ✔ Checking memory availability + sudo systemctl start ghost_mifitnessfacil-com ✔ Starting Ghost + sudo systemctl is-enabled ghost_mifitnessfacil-com Your admin interface is located at: https://www.mifitnessfacil.com/ghost/
7. I go to my website url (https://www.mifitnessfacil.com) and get 502 Bad Gateway 8. After trying many solutions and reading in internet I believe it might be related to ownership of dir `content/` if I run `ls -la`: ```drwxrwxr-x 7 ghost-mgr ghost 4096 Jun 9 10:57 . drwxrwxr-x 4 root root 4096 May 14 20:15 .. -rw-rw-r-- 1 ghost-mgr ghost 119 Sep 26 08:03 .ghost-cli drwxrwxr-x 8 ghost-mgr ghost 4096 Jul 7 09:34 .git -rw-rw-r-- 1 ghost-mgr ghost 83 Jun 9 10:57 .gitignore -rw-rw-r-- 1 ghost-mgr ghost 562 Sep 26 08:03 config.production.json drwxrwxr-x 8 ghost ghost 4096 Jun 2 14:39 content lrwxrwxrwx 1 ghost-mgr ghost 30 Jun 9 10:57 current -> /var/www/ghost/versions/2.23.1 drwxrwxr-x 2 ghost-mgr ghost 4096 Jun 9 10:57 node_modules -rw-rw-r-- 1 ghost-mgr ghost 27 Jun 9 10:57 package-lock.json drwxrwxr-x 4 ghost-mgr ghost 4096 Jun 20 10:21 system drwxrwxr-x 3 ghost-mgr ghost 4096 Jun 2 14:39 versions
As you can see content dir is not owned by
ghost-mgr user. So I tried changing ownership:
sudo chown -R $USER content/
This changes ownership but then when I tried
ghost stop I get:
+ sudo systemctl is-active ghost_mifitnessfacil-com A SystemError occurred. Message: Systemd process manager has not been set up or is corrupted. Help: Run ghost setup linux-user systemd and try again.