Fork me on GitHub

Windows安装Nginx

Nginx官网

官网下载
image
解压后内容如下
image

配置文件

conf/nginx.conf
image

命令

启动nginx:start ./nginx.exe
停止nginx:./nginx.exe -s stop
重载nginx配置:./nginx.exe -s reload
检测配置文件:./nginx.exe -t -c conf/nginx.conf
查看nginx版本:./nginx.exe -V

image
启动后浏览器输入localhost:80查看界面
image

启动脚本

chcp 65001
@echo off
d:
cd D:\ProgramFiles_QY\nginx-1.28.0
start nginx.exe
echo 启动成功......
pause
exit

停止脚本

chcp 65001
@echo off
d:
cd D:\ProgramFiles_QY\nginx-1.28.0
nginx.exe -s stop
echo 已停止nginx.....
pause
exit
posted @ 2025-07-12 15:00  秋夜雨巷  阅读(42)  评论(0)    收藏  举报