Re: Do I Need Reverse Proxy?

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

 




Mod_rewrite might do this. It can cause the user to enter one uri, but apache to rewrite the uri BEFORE parsing it.


Robin-David Hammond  KB3IEN
50 West 17th Street
Ninth Floor
New York, NY 10011
+1 212 479.1700 x 1729


On Wed, 21 Mar 2007, Tod Thomas wrote:

I'm running apache v2.2.0, built from scratch, on an FC6 box. I have a Tomcat based portal server running from port 8080 on the same box. The portal itself, upon initial request, redirects the client a couple of times before it finally rests at a default home page. I'd like to accomplish a couple of things.

First, any request that arrives to the apache server http://myserver/portal I'd like forwarded to http://localhost:8080 without the user ever noticing the are leaving http://myserver/portal. This sounded like a job for reverse proxy.

I can get it working just fine if I use this construct:

<IfModule mod_proxy.c>
 ProxyRequests Off
 ProxyPreserveHost On
 ProxyPass / http://localhost:8080/
 ProxyPassReverse / http://localhost:8080/
</IfModule>

However I don't want to proxy every request to http://myserver, just requests to http://myserver/portal. When I try this:

<IfModule mod_proxy.c>
 ProxyRequests      Off
 ProxyPreserveHost  On
 ProxyPass         /portal/ http://localhost:8080/
 ProxyPassReverse  /portal/ http://localhost:8080/
</IfModule>


It fails. I have a feeling it has to do with the multiple redirects the portal does prior to presenting its initial home page, but I'm not sure since it works fine pointing to /.

Another thing I would like to try and accomplish is to replace http://localhost:8080 with a virtual domain. So instead the proxy example above would 'redirect' to http://virtualdomain:8080. This would still be invisible to the user as they would see the traffic directed to http://myserver/portal. The virtualdomain's name would be resolved locally using an entry in /etc/hosts.

I'd really like to get the first one working. The second is more esoteric but also valuable.

Can anyone offer any advice? Please let me know if there is anything that needs clarification.


Thanks - Tod

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



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