服务器问答
目标站点里面把 css 地址写死成了 http://192.168.160.9.......css
所以现在可以通过 172.xx.xx.xx:8081
访问到首页,但是 css 文件依然是尝试去链接 192 这个目标 ip
最后的效果是首页会卡很久最后给出一个没有 css 加持的 html 骨架
目前我的配置比较简单是这样的,请问有没有什么办法让所有都过反代的流量呢
server {
listen 8081;
server_name 127.0.0.1;#对外暴露为 172.xx.xx.xx
location / { # 斜杠(/)代表根目录
#root html; #代表 html 路径
proxy_pass http://192.168.160.9;# //转发地址
index index国外服务器.html index.htm index.php *;
}
}