Re: Mod-Proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joshua,

thanks for your help with this.
this is application was developed by a 3rd party.
Sounds like this will be fun

Regards,
Suneet


On Thu, Sep 15, 2011 at 1:40 PM, Joshua Stoutenburg <jehoshua02@xxxxxxxxx> wrote:
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
>
>

Coincidentally, I've been researching reverse proxy and found this:
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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux