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

 

解决方法见上。

 

转载于:https://www.cnblogs.com/laopo/p/11229416.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值