Install Nginx under Windows, depressed is found that it does not operate as a service, that is, when the user logs off, the program will be terminated. You need to run Nginx as a service.
Method One:
Suppose Nginx is installed under c:\nginx\:
1. Download the Microsoft Services Registration tool Srvany.exe, Instsrv.exe, stored in the c:\nginx\ directory
Http://eastedu.bl-changjiang.com/UploadFiles/2006-5/511179043.rar
2. Install the Nginx service, switch the command line to C:\nginx\, and execute the following command
Instsrv NGINX C:\nginx\srvany.exe
3. Under C:\nginx\, edit a Nginx.reg file
Windows Registry Editor Version 5.00
[Hkey_local_machine\system\currentcontrolset\services\nginx\parameters]
"Application" = "C:\\nginx\\nginx.exe"
"Appparameters" = ""
"Appdirectory" = "c:\\nginx\\"
5. To associate a service with a program, command line execution
REGEDIT/S Nginx.reg
6. Edit the launch Nginx script Start-nginx.bat (turn off the script without changing), let the program run in service mode
@ECHO OFF
net stop Nginx
net start Nginx
EXIT
Note: The above method only applies to 0.7.33 The following version, Nginx from 0.7.33 update to 0.7.50, recompile to get the new Nginx.exe, can not be started through this service, but through the c:\nginx\ Nginx.exe can still start normally, so we need to use the method and solve it.
Method Two:
Later, Nginx officially launched Win32 version, fire network finishing an attachment, you can let Nginx continue to serve as the form of launch, click Download Attachment .
Allow Nginx to start running as a service under Windows