Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

nginx proxy to subdirectory

$
0
0
Hello, I have a problem with nginx proxy.

I have site on server with IIS at "http://192.168.1.1:80/"
and want to see it at subdirectory like "http://localhost/site1/"

I configure config file as
location /site1/ {
rewrite ^/site1(/.*)$ $1 break;
proxy_pass http://192.168.1.10:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
}
but have a blank page, becouse all css file have get query
to "http://localhost/somecss.css"
insted "http://localhost/site1/somecss.css"

How to fix this?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>