Home > Backend Development > PHP Tutorial > Use nginx in windows environment windows10 download windows optimization master windows7 64-bit flagship

Use nginx in windows environment windows10 download windows optimization master windows7 64-bit flagship

WBOY
Release: 2016-07-29 08:49:03
Original
1304 people have browsed it

Download address http://nginx.org/en/download.html Select the windows version

The file directory structure after downloading is as shown below

windows官网,windows10,windows7,windows8,windows xp,windows8.1,windows10 下载,windows优化大师,windows7 64位旗舰

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;#引用外部配置文件
}
Copy after login

After configuring the file

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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template