upstream myproxy {
server 192.168.100.2;
}
server {
listen 80;
server_name test.82438.com test.fouyue.com;
#charset utf-8;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
proxy_pass http://myproxy;
proxy_set_header host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
index index.html index.htm index.php;
}
这里 index index.html index.htm index.php;
也可以写成 proxy_redirect default;