Nginx反向代理

測試環境:windows7html

Nginx版本:1.9.7nginx

步驟:windows

修改conf\nginx.conf配置文件,在server節點中增長以下配置信息 測試

location /test2 {
    root   html;
    proxy_pass  http://localhost:8081/test2;
    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 100m;
    index index.html index.htm;
}
相關文章
相關標籤/搜索