Nginx
Install
Start Nginx
- Double-click to start nginx.exe, and the command box flashes past
- Enter the command nginx.exe or start nginx
Reload Nginx
1 | nginx -s reload |
Stop Nginx
1 | # Out of service |
Domain name binding
1 | server { |
Forwarding service
1 | location / { |
Setup Nginx starts from startup
Convert the Nginx to the system service
Place the program in the directory of Nginx and rename ‘nginx-service.exe’.
Create configuration file ‘nginx-service.xml’
1
2
3
4
5
6
7
8
9
10<service>
<id>nginx</id>
<name>nginx</name>
<description>nginx</description>
<logpath>D:\xxx\nginx-x.x.x</logpath>
<logmode>roll</logmode>
<depend></depend>
<executable>D:\xxx\nginx-x.x.x\nginx.exe</executable>
<stopexecutable>D:\xxx\nginx-x.x.x\nginx.exe -s stop</stopexecutable>
</service>Execute ‘nginx-service.exe install’ in the CMD in the curent directory
The Service item is set to start