安装 SSL 证书后,我的 vps 上出现 502 错误。systemctl
status nginx.service:
● 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 Sat 2024-02-24 01:49:15 +03; 12min ago
Docs: man:nginx(8)
Process: 2393 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 2395 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 2396 (nginx)
Tasks: 2 (limit: 1012)
Memory: 4.0M
CPU: 102ms
CGroup: /system.slice/nginx.service
├─2396 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
└─2612 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
在错误日志上
2024/02/24 01:57:10 [crit] 2612#2612: *15 connect() to unix:/home/delta/site/delta-django/app.sock failed (2: No such file or directory) while connecting to upstream, client: , server: , request: "GET /old/wp-admin/setup-config.php?step=1 HTTP/1.1", upstream: "http://unix:/home/delta/site/delta-django/app.sock:/old/wp-admin/setup-config.php?step=1", host: "deltaozelders.com"
2024/02/24 01:57:11 [crit] 2612#2612: *18 connect() to unix:/home/delta/site/delta-django/app.sock failed (2: No such file or directory) while connecting to upstream, client: , server: , request: "GET /OLD/wp-admin/setup-config.php?step=1 HTTP/1.1", upstream: "http://unix:/home/delta/site/delta-django/app.sock:/OLD/wp-admin/setup-config.php?step=1", host: "deltaozelders.com"
2024/02/24 01:57:12 [crit] 2612#2612: *21 connect() to unix:/home/delta/site/delta-django/app.sock failed (2: No such file or directory) while connecting to upstream, client: , server: , request: "GET /wp-admin/install.php?step=1 HTTP/1.1", upstream: "http://unix:/home/delta/site/delta-django/app.sock:/wp-admin/install.php?step=1", host: "deltaozelders.com"
2024/02/24 01:57:21 [crit] 2612#2612: *23 connect() to unix:/home/delta/site/delta-django/app.sock failed (2: No such file or directory) while connecting to upstream, client: , server: , request: "POST /Autodiscover/Autodiscover.xml HTTP/1.1", upstream: "http://unix:/home/delta/site/delta-django/app.sock:/Autodiscover/Autodiscover.xml", host: ""
2024/02/24 02:00:10 [crit] 2612#2612: *27 connect() to unix:/home/delta/site/delta-django/app.sock failed (2: No such file or directory) while connecting to upstream, client: , server: , request: "GET / HTTP/1.1", upstream: "http://unix:/home/delta/site/delta-django/app.sock:/", host: "deltaozelders.com"
Nginx -t:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2024/02/24 01:53:53 [warn] 2745#2745: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2024/02/24 01:53:53 [emerg] 2745#2745: cannot load certificate key "/etc/letsencrypt/live/deltaozelders.com/privkey.pem": BIO_new_file() failed (SSL: error:8000000D:system library::Permission denied:calling fopen(/etc/letsencrypt/live/deltaozelders.com/privkey.pem, r) error:10080002:BIO routines::system lib)
nginx: configuration file /etc/nginx/nginx.conf test failed