how to use nginx on windows
1. Download nginx lastest release from here.
2. unzip to your local driver. eg: c:/apps/nginx
3. start nginx
1  | cd c:/apps/nginx  | 
4. monitoring nginx process
1  | tasklist /fi "imagename eq nginx.exe"  | 
notice
一个是主进程(main process),另一个是工作进程(work process).如果启动失败,请查看错误日志logs\error.log
5. visit http://localhost:8080
6. configuration file nginx.conf
reference config1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18error_log  logs/error.log;
http {
    include       mime.types;
    default_type  application/octet-stream;
    server {
                listen       8080;
                server_name  localhost;
                location / {
                    root   html;
                    index  index.html index.htm;
                }
                error_page   500 502 503 504  /50x.html;
                location = /50x.html {
                    root   html;
                }
        }
    ...
}
7. the command list of nginx:
1  | nginx -s stop 快速退出  |