参考winsw:“let everything to be a service”
winsw.xml
<service>
<id>nginx</id>
<name>nginx</name>
<description>nginx</description>
<executable>D:\dev\nginx-1.16.0\nginx.exe</executable>
<arguments>-c D:\dev\nginx-1.16.0\conf\nginx.conf</arguments>
<logmode>rotate</logmode>
</service>
以管理员身份运行cmd
winsw.exe install
winsw.exe start
网友评论