|
请教个问题,
服务器A 1.2.3.4
服务器B 4.3.2.1
域名 a.b.c
服务器B是源站,用A反代它
反代配置就写http://4.3.2.1,域名是a.b.c
AB两台都安装宝塔,A上面 域名a.b.c 修改 hosts为4.3.2.1,并设置反向代理,现在访问域名,网站打不开,是为啥?- #PROXY-START/location ^~ /{ proxy_pass http://4.3.2.1; proxy_set_header Host a.b.c; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_ssl_server_name on; proxy_cache pingtan; proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2; proxy_http_version 1.1; # proxy_hide_header Upgrade; add_header X-Cache $upstream_cache_status; #Set Nginx Cache set $static_filempd4THKr 0; if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" ) { set $static_filempd4THKr 1; expires 1m; } if ( $static_filempd4THKr = 0 ) { add_header Cache-Control no-cache; }}#PROXY-END/
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|