0

I have a html server http://pp000c29784409.usask.ca/ that i am trying to reverse proxy from an Apache 2.4 server using ProxyPass ,ProxyPassReverse and RewriteRule.

the idea is to display all the html content from http://pp000c29784409.mysite.org/ via univers.mysite.org/repo (this is the Apache server)

to this end i have this set up in the http.conf

   <IfModule mod_proxy.c>
      RewriteEngine on
       RewriteRule ^/(images|javascripts|stylesheets)(.*) /repo/$1$2
       SSLProxyEngine on
       ProxyVia On
       ProxyPass        /repo http://pp000c29784409.mysite.org/
       ProxyPassReverse /repo http://pp000c29784409.mysite.org/
   </IfModule>

this works except to a graphic on the page

IIS Windows Server

</head>
<body>
<div id="container">
<a href="./reports"><img src="iis-85.png" alt="IIS" width="960" height="600" /></a>
</div>
</body>
</html>

in the above the image is trying to be retrieved from pp000c29784409.mysite.org/iis-85.png

it should be

pp000c29784409.mysite.org/repo/iis-85.png

which is what I was trying to do using the rewrite , what is the correct form to do that?

R.Merritt
  • 127
  • 1
  • 3

1 Answers1

1

According to what you say the correct proxypass directives would be like:

ProxyPass        /repo/ http://pp000c29784409.mysite.org/repo/
ProxyPassReverse /repo/ http://pp000c29784409.mysite.org/repo/

Note: Always match trailing slashes

Daniel Ferradal
  • 2,415
  • 1
  • 8
  • 13