The nginx reverse proxy fails and the page can be captured, but the css inside the page cannot be obtained because it uses a relative path. What should I do?

WBOY
Release: 2016-08-27 09:06:52
Original
2110 people have browsed it

The environment is windows, and the current configuration is like this:

<code>   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;
        }
    
</code>
Copy after login
Copy after login

The captured page is displayed like this

Reply content:

The environment is windows, and the current configuration is like this:

<code>   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;
        }
    
</code>
Copy after login
Copy after login

The captured page is displayed like this

<code>    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;
    }</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template