Download Address http://nginx.org/en/download.html Select the Windows version
After downloading the file directory structure such as
Look at the nginx.conf under the Conf. This is Nginx's main configuration file
Worker_processes 1; #工作进程数events {worker_connections 1024;} HTTP {include mime.types; Default_type Application/octet-stream; Sendfile on; Keepalive_timeout 65;server {listen; #监听80端口 server_name domain 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; #引用外部配置文件}
After configuring the file
Use the DOS command in the current folder to enter the Nginx boot (black interface flashed over)
The above describes the use of Nginx in Windows environment, including the content of Windows, I hope that the PHP tutorial interested in a friend helpful.