- Download the latest version of Windows Service Wrapper from here.
- Current version as of this writing is v1.17.
- Rename
winsw-1.xx-bin.exe
to something likenginxservice.exe
.- This is the name that will show up for the process that owns your nginx process.
- Place an XML file next to the exe with the same base name, e.g.
nginxservice.xml
. The contents should be like below (verify your nginx location).<service> <id>nginx</id> <name>nginx</name> <description>nginx</description> <executable>c:\nginx\nginx.exe</executable> <logpath>c:\nginx\</logpath> <logmode>roll</logmode> <depend></depend> <startargument></startargument> <stopargument>-s stop</stopargument> </service>
- You can find up to date details about the configuration on the WinSW README page.
- Run the command
nginxservice.exe install
.