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: Images not loading in reverse proxy with Apache in Ubuntu
Author
JumpZero



Joined: 12 Apr 2013
Posts: 2

PostPosted: Fri 12 Apr '13 8:34    Post subject: Images not loading in reverse proxy with Apache in Ubuntu Reply with quote

I've set up a reverse proxy using the Ubuntu Apache2 package (2.2.2, with evidently an old version of mod_proxy_html), and it's about 50% functional, but certain images aren't loading.

I've tried with and without ProxyHTMLExtended on, but even with it on I'm not convinced that any non-inline scripts or CSS files are being properly handled, as they are being directed to my local root directory instead of /app1/, and when it is on, I can no longer log in to the internal webapp.

In the log, the only errors that stand out to me are those referencing things from relative root directories, like /images/* and /ajax/*. The image files are coming from separate CSS files, and it doesn't tell me where exactly the ajax references are originating.

Here is the relevant part of my VH config:

ProxyRequests Off
ProxyPass /app1/ http://example.com/
ProxyHTMLURLMap http://example.com /app1

ProxyHTMLLogVerbose On
LogLevel debug

<Location /app1/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /app1/
ProxyHTMLURLMap /images([^\)]*) url(/app1/images$1) Rih
ProxyHTMLURLMap url\(http://example.com([^\)]*)\) url(http://localhost/app1/) Rih
RequestHeader unset Accept-Encoding
</Location>

And here's an example of the errors:

[Thu Apr 11 23:22:50 2013] [error] [client 127.0.0.1] File does not exist: /var/www/images, referer: http://localhost/app1/css/examplefile.css
[Thu Apr 11 23:31:00 2013] [error] [client 127.0.0.1] File does not exist: /var/www/ajax, referer: http://localhost/app1/admin/

Comparing the source to the proxied version, I see that the images are going from "/images/*" to "/var/www/images/*".

I've been poring through documentation for days but I can't seem to find a solution, so any assistance would be greatly appreciated.


Last edited by JumpZero on Sat 13 Apr '13 2:11; edited 1 time in total
Back to top
JumpZero



Joined: 12 Apr 2013
Posts: 2

PostPosted: Fri 12 Apr '13 10:35    Post subject: Reply with quote

I am rethinking my design and trying to make do with just proxy_http, as the site seems to respond better to it. Still, any tips on getting proxy_html working better would be welcome.
Back to top


Reply to topic   Topic: Images not loading in reverse proxy with Apache in Ubuntu View previous topic :: View next topic
Post new topic   Forum Index -> Apache