Hi there,
I have been running my website powered by Ghost successfully for several months now. Last night I updated my server, and then updated Ghost. Since the update, I am unable to start Ghost, and it is preventing me from even starting NGINX.
Here are my Ghost and System Details
Domain = mythbound.online
GHOST:
Ghost-CLI version: 1.24.2
Ghost version: 5.65.0 (at /var/www/mythbound/website/ghost)
SYSTEM:
OS: Ubuntu 22.04.3 LTS
Kernel: 5.15.0-84-generic
Node: v18.17.1
NPM: 9.6.7
NGINX: nginx/1.18.0 (Ubuntu)
Running ghost doctor gives the following:
✔ Checking system Node.js version - found v18.17.1
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
System checks failed with message: 'Missing package(s): nginx'
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
? Continue anyway? Yes
System stack check skipped
ℹ Checking system compatibility [skipped]
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_mythbound-online
Instance is currently running
ℹ Validating config [skipped]
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v18.17.1
That is to be expected as I cannot start NGINX, but at least you can see that all the perms are set correctly, and that Ghost is finding the right Node version.
When I test NGINX config the tests pass perfectly fine, as showing here:
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
When I look at the NGINC logs, I see that these errors occurred while trying to start NGIX.
2023/09/22 00:23:21 [error] 582065#582065: *142949 open() "/var/www/mythbound/website/ghost/system/nginx-root/.well-known/acme-challenge/6s-F8N9doZMrknm_58YhxG5GPIORbgjyTU8soZAJEWI" failed (2: No such file or directory), client: 18.222.24.83, server: mythbound.online, request: "GET /.well-known/acme-challenge/6s-F8N9doZMrknm_58YhxG5GPIORbgjyTU8soZAJEWI HTTP/1.1", host: "mythbound.online"
2023/09/22 00:23:21 [error] 582065#582065: *142950 open() "/var/www/mythbound/website/ghost/system/nginx-root/.well-known/acme-challenge/6s-F8N9doZMrknm_58YhxG5GPIORbgjyTU8soZAJEWI" failed (2: No such file or directory), client: 23.178.112.200, server: mythbound.online, request: "GET /.well-known/acme-challenge/6s-F8N9doZMrknm_58YhxG5GPIORbgjyTU8soZAJEWI HTTP/1.1", host: "mythbound.online"
2023/09/22 00:23:21 [error] 582065#582065: *142951 open() "/var/www/mythbound/website/ghost/system/nginx-root/.well-known/acme-challenge/6s-F8N9doZMrknm_58YhxG5GPIORbgjyTU8soZAJEWI" failed (2: No such file or directory), client: 35.88.153.50, server: mythbound.online, request: "GET /.well-known/acme-challenge/6s-F8N9doZMrknm_58YhxG5GPIORbgjyTU8soZAJEWI HTTP/1.1", host: "mythbound.online"
The issue seems to be that the .well-known directory does not exist, and NGINX is trying to look there for SSL certificates.
Here is my NGINX server block for my ghost powered website:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mythbound.online;
root /var/www/mythbound/website/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
ssl_certificate /etc/letsencrypt/mythbound.online/fullchain.cer;
ssl_certificate_key /etc/letsencrypt/mythbound.online/mythbound.online.key;
include /etc/nginx/snippets/ssl-params.conf;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 1g;
}
I do not know how to fix this, can any of you help me? If I just remove this part of the server block:
}
location ~ /.well-known {
allow all;
}
Will that fix the problem?
Is there a better way to fix this issue?
Everything was working fine until last night when I updated the server and then updated Ghost.
Thanks
Jay