http://nginx.org/en/docs/windows.html 点击跳转
http://nginx.org/en/download.html 点击跳转
nginx的配置文件是conf目录下的nginx.conf,默认配置的nginx监听的端口为80
将静态资源(如jpg|png|css|js等)放在如下配置的F:\front\dist目录下,然后在nginx配置文件中做如下配置(注意:静态资源配置只能放在 location / 中),浏览器中访问 http://192.168.1.105:9090/module/index.html 即可访问到 F:\front\dist 目录下的页面
配置文件 proxy.conf 放在conf目录下
proxy_http_version 1.1; proxy_connect_timeout 300s; proxy_send_timeout 900; proxy_read_timeout 7200s; proxy_headers_hash_max_size 51200; proxy_headers_hash_bucket_size 6400; proxy_buffer_size 32k; proxy_buffers 4 64k; proxy_busy_buffers_size 128k; proxy_redirect off; proxy_hide_header Vary; proxy_set_header Accept-Encoding ''; proxy_set_header Referer $http_referer; proxy_set_header Cookie $http_cookie; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;