You still have a bad gateway. Bounce the server to bring everything up, and then check that the service and ghost is running:
systemctl status ghost_jvlobo-com.service
ghost ls
You still have a bad gateway. Bounce the server to bring everything up, and then check that the service and ghost is running:
systemctl status ghost_jvlobo-com.service
ghost ls
Okay, Ghost appears to be running now, so letâs have a look at Nginx.
Can you share /etc/nginx/sites-available/<site-name>.conf
?
Okay, as I suspected, Ghost has incremented the port. So, edit the Nginx conf and change the last proxy_pass
line to 2369
.
Then run âŚ
sudo nginx -t
sudo systemctl reload nginx.service`
I see⌠true.
I changed it on both files:
Reloaded Nginx and nothing. I also restarted the server just in case, but still same error
Could there be anywhere else where the port is wrong?
Letâs try sudo systemctl restart nginx.service
. It shouldnât make a difference, but then again âŚ
Then, letâs run ghost doctor
to check folder permissions.
Now this is blowing my mind
ghost doctor
says I should have node 10 or 12?
I donât understand:
And also the OS compatibility, I didnât see that issue before.
Youâre not on the latest version of ghost-cli
.
sudo npm install ghost-cli@latest -g
Furthermore, output from ls -Flai /var/www/ghost
.
Ok, now I got the proper version.
Here you can see the commands I ran:
Now, if I run ghost start
, it seems like it got stuck on the Starting Ghost
part:
It has been there for a while (~5min).
I tried to start it with ghost run
and that still works as it did before.
I see the error in the logs:
May 16 16:47:39 blog node[28633]: node:internal/modules/cjs/loader:1143
May 16 16:47:39 blog node[28633]: throw err;
May 16 16:47:39 blog node[28633]: ^
May 16 16:47:39 blog node[28633]: Error: Cannot find module '/usr/bin/ghost'
May 16 16:47:39 blog node[28633]: at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
May 16 16:47:39 blog node[28633]: at Module._load (node:internal/modules/cjs/loader:981:27)
May 16 16:47:39 blog node[28633]: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
May 16 16:47:39 blog node[28633]: at node:internal/main/run_main_module:28:49 {
May 16 16:47:39 blog node[28633]: code: 'MODULE_NOT_FOUND',
May 16 16:47:39 blog node[28633]: requireStack: []
May 16 16:47:39 blog node[28633]: }
May 16 16:47:39 blog node[28633]: Node.js v18.20.2
If I do which ghost
, it seems like it got installed on /usr/local/bin/ghost
I just changed it on system/files/ghost_jvlobo-com.service
so it runs with /usr/local/bin/ghost
and trying again.
IT WORKS!! finally
Thanks a lot for all your patience and help!! 10/10 man, thanks a lot
Now I have to fix my theme and everything should be back to normal
I donât know which answer I should accept as we have been going back and forward some much
You are welcome! Iâm pleased itâs working for you ⌠youâre lucky, Iâm recuperating from surgery and canât do much else.
Tenha uma boa noite.
Get well!!
And thanks again, obrigado!