如何测试apache和nginx的配置是否正确?
发布于 作者:苏南大叔 来源:程序如此灵动~
本篇文章较为基础,就介绍几条比较常用的命令。我们修改完apache或者nginx的配置之后,如何测试其是否正确,如何快速使其生效。(本文测试环境是mac
)
apache:
httpd -V
apachectl configtest
sudo apachectl restart
nginx:
nginx -V
nginx -t
nginx -s reload
参数-V是可以用于查看,配置文件的位置的。
总结
更多由苏南大叔带来的相关精彩内容,可以点击这里查看。https://newsn.net/tag/nginx/ 。


