我正在尝试追踪 nginx 的问题。
service nginx start
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
然后查看日志:
root@admin:~# systemctl status nginx.service
● nginx.service - LSB: Stop/start nginx
Loaded: loaded (/etc/init.d/nginx; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-12-24 08:06:17 GMT; 18s ago
Docs: man:systemd-sysv-generator(8)
Process: 3166 ExecStart=/etc/init.d/nginx start (code=exited, status=1/FAILURE)
Dec 24 08:06:17 admin.xxx.com systemd[1]: Starting LSB: Stop/start nginx...
Dec 24 08:06:17 admin.xxx.com systemd[1]: nginx.service: Control process exited, code=exited status=1
Dec 24 08:06:17 admin.xxx.com systemd[1]: Failed to start LSB: Stop/start nginx.
Dec 24 08:06:17 admin.xxx.com systemd[1]: nginx.service: Unit entered failed state.
Dec 24 08:06:17 admin.xxx.com systemd[1]: nginx.service: Failed with result 'exit-code'.
当我查看端口是否繁忙时,我看到:
sudo netstat -anp | grep ':80 '
tcp 0 0 139.162.248.70:80 0.0.0.0:* LISTEN 1062/nginx.conf
tcp6 0 0 :::80 :::* LISTEN 1062/nginx.conf
愚蠢的是,nxinx 似乎确实在运行!该服务器使用 nginx 作为前端(然后使用 Apache2 作为 Perl 脚本的反向代理)。因此,如果我访问服务器上的某个站点,它会加载正常:https://bodywisegym.co.uk/
我不明白 :/