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/

this works except to a graphic on the page

IIS Windows Server

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

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

it should be


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


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

  • Hey Ezra thanks! that is so obvious I cant believe i didn't try that :) – R.Merritt Sep 26 '17 at 14:02
  • @j.doezer Fantastic, then mark my asnwer as the correct one so other people don't need to check your question since it has already been answered. – ezra-s Sep 27 '17 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.