在windows下用winsw把nginx当成服务运行
发布时间:2020-12-13 21:14:04 所属栏目:Windows 来源:网络整理
导读:1. 下载winsw https://github.com/kohsuke/winsw/releases 2. 配置winsw.xml,把winsw放在nginx同一目录 configuration idnginx/id namenginx/name descriptionnginx/description executable%BASE%/nginx.exe/executable stopexecutable%BASE%/nginx.exe -s
1. 下载winsw https://github.com/kohsuke/winsw/releases 2. 配置winsw.xml,把winsw放在nginx同一目录 <configuration> <id>nginx</id> <name>nginx</name> <description>nginx</description> <executable>%BASE%/nginx.exe</executable> <stopexecutable>%BASE%/nginx.exe -s stop</stopexecutable> <logpath>%BASE%/logs/</logpath> <logmode>roll</logmode> <depend></depend> </configuration>3.安装,以管理员身份启动cmd winsw install winsw uninstall //卸载 4.启动、关闭服务 net start nginx net stop nginx (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Windows Server 2008的IDS?
- windows-vista – 使用远程桌面时Windows Vista默认打印机更
- active-directory – 如果Windows商店将“所有内容”移动到
- 从Microsoft .net调用单声道c#代码?
- windows-server-2008 – 如何让WSUS对用户的侵入性降低?
- windows – 如何从批处理文件中运行命令并立即返回?
- MVVM Windows Phone 8 – 向地图添加图钉集合
- Windows Store应用程序与本地桌面应用程序之间的通信
- windows – 如何在linux上设置私有git服务器
- windows – 没有命令提示符的Vboxheadless(VirtualBox)