logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: issue using proxy : image is wrong retrieved
Author
merrittr



Joined: 18 Aug 2015
Posts: 16
Location: canada

PostPosted: Fri 22 Sep '17 17:23    Post subject: issue using proxy : image is wrong retrieved Reply with quote

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

Code:
   <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

Code:
</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?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Sat 07 Oct '17 13:47    Post subject: Reply with quote

When you try with a slash after /repo: /repo/ ?


When still not works, have a look at mod_proxy_html :

https://httpd.apache.org/docs/2.4/mod/mod_proxy_html.html

And tutorial:

http://www.apachetutor.org/admin/reverseproxies
Back to top


Reply to topic   Topic: issue using proxy : image is wrong retrieved View previous topic :: View next topic
Post new topic   Forum Index -> Apache