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;

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;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2021-09-01
  • 2021-11-23
  • 2021-12-03
猜你喜欢
  • 2021-09-17
  • 2022-01-30
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案