0

I have a virtualhost that is a reverse proxy based on a path param "xmg"

<VirtualHost *:443>
ServerAlias some.example
SSL...
   ProxyPass /xmg http://localhost:5553/
   ProxyPassReverse /xmg http://localhost:5553/
<VirtualHost>

the application is not one i can change, the reverse proxy works, the base html loads, but the clientside html is not "aware" of the path param (xmg), so other assets (js,... ) are sought without the "/xmg/" how can i use the referer, in this case "https://some.example/xmg" to rewrite the requests "/bla.js" to localhost:5553/ or proxypass?

user22866
  • 151

1 Answers1

0

This is what seems to have worked, following this link to treat paths as being different sites, the external app i have no controll over was placed in its own virtual host, which was altered with an additional alias

Listen 4443
<VirtualHost *:4443>
   ServerAlias xxxx
   DocumentRoot /some/path
   Alias /xmg /some/path
   <Directory...>
   <Directory>
<VirtualHost>

and there reverse proxy settings were made to match the Alias:

<VirtualHost *:443>
     ... other settings 
    ProxyPass /xmg http://localhost:4443/xmg
    ProxyPassReverse /xmg http://localhost:4443/xmg
<VirtualHost>
user22866
  • 151