Write in front
Environment: win10, nginx1.8.1.
1: Download and install
1.1: Download
In here to download the installation package.
1.2: Unzip
Unzip it to a custom directory.
2: Configuration and testing
2.1: Configuration
Because nginx listens on port 80 by default, this port will be used, so the modification nginx.conf
under the listen 80;
modification is listen 99;
as follows:
server {
listen 99;
...
2.2: Start
D:\program_files\nginx-1.8.1\nginx-1.8.1>start nginx.exe
D:\program_files\nginx-1.8.1\nginx-1.8.1>netstat -ano | findstr "99"
TCP 0.0.0.0:99 0.0.0.0:0 LISTENING 25664
2.3: Access test
The default listening address is localhost, so uselocalhost:
2.4: Other commands
nginx.exe -s stop //停止nginx
nginx.exe -s reload //重新加载nginx
nginx.exe -s quit //退出nginx