Windows安装nginx
- 下载nginx
- 解压
比如D:\nginx
- 下载工具
Windows Service Wrapper
winsw-2.9.0-bin.exe
Index of releases/com/sun/winsw/winsw
- 配置
winsw-2.9.0-bin.exe改名为nginx-service.exe
创建配置文件nginx-service.xml,内容如下:
<service>
<id>nginx</id>
<name>Nginx Service</name>
<description>High Performance Nginx Service</description>
<logpath>D:\nginx\logs</logpath>
<log mode="roll-by-size">
<sizeThreshold>10240</sizeThreshold>
<keepFiles>8</keepFiles>
</log>
<executable>D:\nginx\nginx.exe</executable>
<startarguments>-p D:\nginx</startarguments>
<stopexecutable>D:\nginx\nginx.exe</stopexecutable>
<stoparguments>-p D:\nginx -s stop</stoparguments>
</service>
- 安装
D:\nginx\nginx-service.exe install
- 卸载
D:\nginx\nginx-service.exe uninstall
- 查看
运行services.msc
原文地址:https://blog.csdn.net/quantum7/article/details/141157157
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!