nginx 相关命令

验证配置是否正确: nginx -t

查看Nginx的版本号:nginx -V

启动Nginx:start nginx

快速停止或关闭Nginx:nginx -s stop

正常停止或关闭Nginx:nginx -s quit

配置文件修改重装载命令:nginx -s reload

1、错误情况:

nginx: [error] CreateFile() "E:\nginx\nginx-1.9.3/logs/nginx.pid" failed

nginx: [error] Open() "E:\nginx\nginx-1.9.3/logs/nginx.pid" failed

 

使用命令创建/logs/nginx.pid文件: nginx -c conf/nginx.conf

 

相关文档说明:


http://www.cnblogs.com/wangkongming/p/4004416.html


http://www.cnblogs.com/xiaogangqq123/archive/2011/03/02/1969006.html

 

2、配置多个80端口 server:

 

相关文档说明:

http://os.51cto.com/art/201404/437182.htm


3、不同端口为本地nginx服务器配置多个站点:

相关文档说明:

http://blog.csdn.net/yongzhang52545/article/details/51282914

http://www.2cto.com/os/201411/355976.html

posted @ 2017-03-20 17:27  好学Ace  阅读(13823)  评论(0编辑  收藏  举报