Coincidentally, I've been researching reverse proxy and found this:On Thu, Sep 15, 2011 at 10:09 AM, Suneet Shah <suneetshah2000@xxxxxxxxx> wrote:
> Hello,
>
> I am trying to setup a reverse proxy to one of our applications, but I am
> finding that the page comes up, but all the urls that load the stylesheets
> and _javascript_ are all broken.
>
> I have pasted below my configuration. Any thoughts on what I am doing wrong
> or overlooked?
>
> <Location "/app/">
>
> ProxyPass http://172.17.2.113:2525/
>
> ProxyHTMLEnable On
> ProxyHTMLURLMap / /app/
> RequestHeader unset Accept-Encoding
>
> </Location>
>
> Thanks for your help
>
>
http://www.apachetutor.org/admin/reverseproxies#d8
It looks like you have to do some extra work to write rules that match
and rewrite all the urls throughout the html, css, _javascript_, etc.
When I build a web application, I am very, very careful to write all
urls so that the application can be moved from one server to another
without breaking. I use an approach I call "dynamic absolute" where
the application dynamically detects its location in the file system
and defines that as a constant for the rest of the application to use,
then determines the proper http/https url, defining that as a constant
as well. Then throughout the application, I use the constants, rather
than literally typed url. The end result is absolute urls.
If you didn't have any part in building the application, I apologize.
I consider problems with urls to be a "code smell", specifically
"Excessive use of literals" (http://en.wikipedia.org/wiki/Code_smell).
Usually, where there is one code smell likely to be many more. So
watch out and good luck!
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
" from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx