【Nginx】检查配置文件是否正确

2023-11-15

1.进入配置nginx路径

/usr/local/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf

2.返回这个就是正确

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

3.可以重启

systemctl restart nginx

其他两种启动方式:

service nginx restart

/usr/sbin/nginx -s reload
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

【Nginx】检查配置文件是否正确 的相关文章

随机推荐