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
--
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具