用Windows Service Wrapper工具實現windows下實現nginx開機自啓。html
<service> <id>NginxService</id> <name>NginxService</name> <description>NginxService</description> <executable>C:\YaleSoftFiles\Develop\nginx-1.11.3\nginx.exe</executable> <logpath>C:\YaleSoftFiles\Develop\nginx-1.11.3\service\log</logpath> <logmode>roll</logmode> <depend></depend> <startargument>-p</startargument> <startargument>C:\YaleSoftFiles\Develop\nginx-1.11.3</startargument> <stopexecutable>C:\YaleSoftFiles\Develop\nginx-1.11.3\nginx.exe</stopexecutable> <stopargument>-p</stopargument> <stopargument>C:\YaleSoftFiles\Develop\nginx-1.11.3</stopargument> <stopargument>-s</stopargument> <stopargument>stop</stopargument> </service>
進入windows-->system32-->右鍵「以管理員的方式打開」cmd.exenginx
進入service目錄執行installService.batwindows
命令行:services.mscapp
sc delete NginxService