随笔 - 424  文章 - 0  评论 - 89  阅读 - 48万

nginx的安装windows

参考网站:nginx for Windows

1.下载https://nginx.org/en/download.html最新版本,nginx-1.25.3,解压到当前文件夹

 

2.启动,停止nginx

启动:

D:\nginx\nginx-1.25.3>start nginx.exe

查看nginx的启动进程:

D:\nginx\nginx-1.25.3>tasklist /fi "imagename eq nginx.exe"

映像名称                       PID 会话名              会话#       内存使用
========================= ======== ================ =========== ============
nginx.exe                    16944 Console                  111      8,224 K
nginx.exe                    38200 Console                  111      8,276 K

One of the processes is the master process and another is the worker process. If nginx does not start, 
look for the reason in the error log file logs\error.log. If the log file has not been created, the reason 
for this should be reported in the Windows Event Log. If an error page is displayed instead of the 
expected page, also look for the reason in the logs\error.log file.

ngnix停止、退出、重启:

nginx -s stop	  fast shutdown
nginx -s quit	  graceful shutdown
nginx -s reload	  changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
nginx -s reopen	  re-opening log files

For example, to stop nginx processes with waiting for the worker processes to finish serving current requests, the following command can be executed:

nginx -s quit

修改了nginx的配置之后需要执行reload命令重新加载配置:

nginx -s reload
检查配置文件格式是否正确
nginx -t
D:\nginx\nginx-1.25.3>nginx.exe -t
nginx: the configuration file D:\nginx\nginx-1.25.3/conf/nginx.conf syntax is ok
nginx: configuration file D:\nginx\nginx-1.25.3/conf/nginx.conf test is successful

 

3.nginx常用命令  

查看nginx版本:
D:\nginx\nginx-1.25.3>nginx -v
nginx version: nginx/1.25.3

或者:

D:\nginx\nginx-1.25.3>nginx.exe -v
nginx version: nginx/1.25.3

 

 

 

 

 

 

 

--

posted on   有点懒惰的大青年  阅读(75)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示