前天蓝速云在正常给一台服务器重新安装LNMP环境的时候,且在最后可以看到成功界面。于是就正常的重新部署站点环境添加站点转移数据,且解析也确定没有问题,可是网站还是打不开,我开始以为是域名我本地没有解析成功,让其他同事帮忙打开依旧是无法打开的。可以判断出来当前服务器配置环境出现故障。
于是检查Nginx状态重启发现有故障:
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
然后再检查Nginx的状态:
>>> systemctl status nginx.service
● nginx.service - nginx - high performance web server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2019-08-13 07:17:32 CST; 32s ago
Docs: http://nginx.org/en/docs/ From itbulu.com
Process: 21862 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
Feb 06 09:10:22 10-46-88-14 systemd[1]: Starting nginx - high performance web server...
Feb 06 09:10:22 10-46-88-14 nginx[21862]: nginx: [emerg] "server" directive is not allowed here in /etc/nginx/nginx.conf:35
Feb 06 09:10:22 10-46-88-14 systemd[1]: nginx.service: control process exited, code=exited status=1
Feb 06 09:10:22 10-46-88-14 systemd[1]: Failed to start nginx - high performance web server.
Feb 06 09:10:22 10-46-88-14 systemd[1]: Unit nginx.service entered failed state.
Feb 06 09:10:22 10-46-88-14 systemd[1]: nginx.service failed.