Nginx Reverse proxy fails and the page can be caught, but the css inside the page cannot be obtained because of the relative path. what should I do?

Source: Internet
Author: User
The environment is windows. the current configuration is as follows: Workshop & quot; & amp; gt; the environment is windows. the current configuration is as follows:

   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;        }    

The crawled page is displayed as follows:

Reply content:

The environment is windows. the current configuration is as follows:

   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;        }    

The crawled page is displayed as follows:

Root "website path"; 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 ;}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.