nginx代理访问其他路由不跳转
作者:
Chting | 来源:发表于
2024-03-31 09:44 被阅读0次server {
listen 80;
server_name dev.baidu.com;
root /var/www/html/wwwroot/testbaidu;
index index.php index.html index.htm;
location /baidu {
proxy_pass https://www.baidu.com/;
proxy_set_header Host "www.baidu.com";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
# proxy_redirect off;
proxy_redirect default;
proxy_ignore_client_abort on;
}
}
本文标题:nginx代理访问其他路由不跳转
本文链接:https://www.haomeiwen.com/subject/orgvtjtx.html
网友评论