windows 下Nginx 入门
验证配置是否正确: nginx -t
查看Nginx的版本号:nginx -V
启动Nginx:start nginx
快速停止或关闭Nginx:nginx -s stop
正常停止或关闭Nginx:nginx -s quit
配置文件修改重装载命令:nginx -s reload
D:\server\nginx-1.16.0>nginx -t
nginx: the configuration file D:\server\nginx-1.16.0/conf/nginx.conf syntax is ok
nginx: configuration file D:\server\nginx-1.16.0/conf/nginx.conf test is successful
如果Nginx 启不来,80端口被占用 ,可以尝试把端口号 改一下。
以下是错误 :
nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
2019/07/23 01:26:43 [emerg] 6412#2012: CreateFile() "C:\Users\Administrator/conf/nginx.conf" failed (3: The system cannot find the path specified)
nginx: configuration file C:\Users\Administrator/conf/nginx.conf test failed
解决方法见上。
转载 请注明原文地址并标明转载:http://www.cnblogs.com/laopo
商业用途请与我联系:lcfhn168@163.com