Install nginx in windows for beginners and windowsng.pdf for beginners
Windows Installation nginx,: http://nginx.org/download/
When downloading, download the. zip extension package because the. zip package has the nginx.exe Startup File.
After the download, put it in a directory on your local disk, enter the directory in the cmd command box, and enter
start nginx
You can start the nginx service. The page for 127.0.0.1: 80 is displayed, and the page for welcome to nginx is successfully started.
If port 80 of the local machine is occupied by default, the accessed webpage will be occupied. At this time, go to the local diskC: \ Windows \ System32 \ drivers \ etc
To check whether there is any configuration that occupies port 80 in the host file, you can back up the file and cancel it temporarily,
Open the cmd command box to check the port usage and disable it.
See this article: http://blog.csdn.net/langqiao123/article/details/73551538
After the port number is disabled, start the nginx server again. The page showing the successful start is displayed.
Nginx-t-c/path/nginx in the configuration file. run the conf command to check whether the nginx configuration file is correct. When nginx-s reload changes the configuration file, restart the nginx workflow, when the configuration file takes effect, nginx-s reopen open the log file nginx-s stop force stop nginx-s quit Security close
Sometimes, when the nginx service is stopped, it cannot be actually stopped. You can see a script written on the Internet, which is easy to use and placed on the root directory of nginx installation.
Stop. bat
@echo off %~d0 cd %~dp0 nginx -s quit
Restart. bat
@echo off %~d0 cd %~dp0 nginx -s reload
Reference: http://blog.csdn.net/xqhys/article/details/68485186