Welcome! Log In Create A New Profile

Advanced

Proxy pass help needed!

July 24, 2023 08:19PM
Hi,

I followed the instructions to create a proxy pass based on a remote server location:

location /location1 {
proxy_pass http://192.168.9.202/;
}

and it ALMOST works fine except when the elements on the destination web page are referenced starting with /.

Example:

<link rel="stylesheet" type="text/css" href="css/reset.css"/>
This url works and it's rewritten correctly like this: http://192.168.9.202/location1/css/reset.css

and

<script src="/js/lib/rc.min.js" onload="$rc.ready();"></script>
This url doesn't work because it starts with an absolute path and it's rewritten like this: http://192.168.8.202/js/lib/rc.min.js but it should be http://192.168.8.202/location1/js/lib/rc.min.js

Can someone help me?

Thankx
Subject Author Posted

Proxy pass help needed!

alessandro.munari July 24, 2023 08:19PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 228
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready