您好,欢迎访问一九零五行业门户网

nginx反向代理失败,能抓到页面,但页面内部的css因为使用相对路径无法获取,怎么办?

环境是windows,目前的配置就是这样:
location / { root html; index index.html index.htm; } location /baidu { proxy_pass http://localhost:97; proxy_set_header host $host; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; }

抓取的页面这样显示
回复内容: 环境是windows,目前的配置就是这样:
location / { root html; index index.html index.htm; } location /baidu { proxy_pass http://localhost:97; proxy_set_header host $host; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; }

抓取的页面这样显示
root 网站路径; location / { index index.html index.htm; } location /baidu { proxy_pass http://localhost:97; proxy_set_header host $host; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; }
其它类似信息

推荐信息