1. nginx启动报错: Job for Nginx.service failed because the control process exited with error code.See "systemctl status ngin
1. 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.conf配置文件里面配置错误,可以使用命令检查在哪里出错
nginx -t
出错的地方:
nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /etc/nginx/conf/nginx.conf:82
进行改正,并再次检查。输出以下信息表示ok。
nginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf test is successful
启动nginx:
systemctl start nginx
建议每次更改配置文件都先执行命令检查一下配置文件是否配置成功。
2.nginx相关命令
查看nginx启动状态
systemctl status nginx
重启加载nginx
systemctl reload nginx
强制重启nginx
systemctl restart nginx
停止nginx
systemctl stop nginx
禁用nginx
systemctl disable nginx
来源地址:https://blog.csdn.net/m0_50176078/article/details/126947631
--结束END--
本文标题: Job for nginx.service failed because the control process exited with error code.
本文链接: https://lsjlt.com/news/375144.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0