Unzip to a directory. Example E:/server/nginx- 1.7.2.
Double-click nginx to start the nginx service.
The configuration file nginx.conf in the conf directory can configure virtual domain names.
In order to open and close nginx service conveniently, you can write two bat files.
Create a new start_nginx.bat file and edit the file input.
@ Turn off echo
CD/d E:\ server \ nginx- 1 . 7 . 2 \? # Based on your actual directory?
Start nginx.exe.
export
Create a new stop_nginx.bat file and edit the input.
@ Turn off echo
* Windows 2000, 98
* ts kill/A nginx & gt; empty
* windows XP or above:
taskkill/F/IM nginx.exe & gt; empty
export
Double-click start_nginx.bat to start the nginx service, and double-click stop_nginx.bat to close nginx.
Note: nginx default port 80? If the windows system is win 10? In win 10 system, a service starts at port 80 by default, which will cause nginx service to fail to start. Please shut down this service before starting nginx. The World Wide Web publishing service can set the service shutdown startup type to manual.