Download address http://nginx.org/en/download.html Select the windows version
The file directory structure after downloading is as shown below
Look at nginx.conf under conf This is The main configuration file of nginx
worker_processes 1;#工作进程数 events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80;#监听80端口 server_name 域名; location / { proxy_pass http://127.0.0.1:8080/xxx/index.jsp;#需要代理的本地资源 proxy_cookie_path / /; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { proxy_pass http://127.0.0.1:8080; } location ~ .*\.(js|css)$ { proxy_pass http://127.0.0.1:8080; } } include xxx.conf;#引用外部配置文件 }
Use the dos command in the current folder and enter nginx to start (the black interface flashes by)
The above introduces the use of nginx in the windows environment, including Windows aspects. I hope it will be helpful to friends who are interested in PHP tutorials.