Hi my website is not working (404 error) after installation. I think it is something related to nginx.
ghost doctor:
Checking system Node.js version - found v20.18.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
Checking system compatibility
Checking for a MySQL installation
- sudo systemctl is-active ghost_www-elektrojazdenie-sk
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 v20.18.1
Ghost setup ssl:
- sudo /etc/letsencrypt/acme.sh --upgrade --home /etc/letsencrypt
- sudo /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --server letsencrypt --domain www.elektrojazdenie.sk --webroot /var/www/elektrojazdenie/system/nginx-root --reloadcmd “nginx -s reload” --accountemail info@elektrojazdenie.sk --keylength 2048
Setting up SSL
One or more errors occurred.
- ProcessError
Message: Command failed: /bin/sh -c sudo -S -p ‘#node-sudo-passwd#’ /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --server letsencrypt --domain www.elektrojazdenie.sk --webroot /var/www/elektrojazdenie/system/nginx-root --reloadcmd “nginx -s reload” --accountemail info@elektrojazdenie.sk --keylength 2048
[Tue Dec 31 14:42:09 UTC 2024] www.elektrojazdenie.sk: Invalid status. Verification error details: 141.144.236.165: Fetching http://www.elektrojazdenie.sk/.well-known/acme-challenge/PT70PMI-L8aBpclh0GKcFinS3KudUV0JaS5P1nNZ1Q4: Error getting validation data
[Tue Dec 31 14:42:09 UTC 2024] Please add ‘–debug’ or ‘–log’ to see more information.
[Tue Dec 31 14:42:09 UTC 2024] See: How to debug acme.sh · acmesh-official/acme.sh Wiki · GitHub
[Tue Dec 31 14:42:04 UTC 2024] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Tue Dec 31 14:42:04 UTC 2024] Single domain=‘www.elektrojazdenie.sk’
[Tue Dec 31 14:42:05 UTC 2024] Getting webroot for domain=‘www.elektrojazdenie.sk’
[Tue Dec 31 14:42:05 UTC 2024] Verifying: www.elektrojazdenie.sk
[Tue Dec 31 14:42:06 UTC 2024] Pending. The CA is processing your order, please wait. (1/30)
Exit code: 1
Debug Information:
OS: Ubuntu, v22.04.5 LTS
Node Version: v20.18.1
Ghost Version: 5.105.0
Ghost-CLI Version: 1.26.1
Environment: production
Command: ‘ghost setup ssl’
/etc/nginx/sites-available - file www.elektrojazdenie.sk.conf:
map $status $header_content_type_options {
204 “”;
default “nosniff”;
}
server {
listen 80;
listen [::]:80;
server_name www.elektrojazdenie.sk;
root /var/www/elektrojazdenie/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
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;
add_header X-Content-Type-Options $header_content_type_options;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}
NGINX status:
sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2024-12-31 14:02:24 UTC; 46min ago
Docs: man:nginx(8)
Process: 731 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 829 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 840 (nginx)
Tasks: 3 (limit: 14232)
Memory: 15.2M
CPU: 74ms
CGroup: /system.slice/nginx.service
├─ 840 “nginx: master process /usr/sbin/nginx -g daemon on; master_process on;”
├─4328 “nginx: worker process” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” "> └─4329 “nginx: worker process” “” “” “” “” “” “” “” “” “” “”
GHOST LS>
Name │ Location │ Version │ Status │ URL │ Port │ Process Manager │
├────────────────────────┼──────────────────────────┼─────────┼──────────────────────┼────────────────────────────────┼──────┼─────────────────┤
│ www-elektrojazdenie-sk │ /var/www/elektrojazdenie │ 5.105.0 │ running (production) │ https://www.elektrojazdenie.sk │ 2368 │ systemd │
└────────────────────────┴──────────────────────────┴─────────┴──────────────────────┴────────────────────────────────┴──────┴─────────────────┘
Many thanks for help.
BR,