Google dot what?
Posts: 2
16 credits Members referred : 0
« on: Jun 02, 2009, 08:54:38 pm »
Hey guys.
I've been playing with mod_rewrite, mod_alias and the variety of mod_proxy the last 2 days. What I've been asked to do is this...
We have 1 domain name pointing at an IP address. That IP address goes through 2 routers both having port 80 open and routing it to 1 of 4 virtual machines (demo.server.com will be the example). So, one of our clients would type in server.com and be directed to the webpage on demo.server.com. Now, if they type in staging.server.com instead, it still has to hit demo.server.com due to routing. What I'm trying to do is create a reverse proxy that, when a user outside the network tries to get to staging.server.com, demo.server.com, it grabs the information from that virtual machine.
We are running Apache2.2 on Ubuntu 8.10 and each virtual machine was created with VMWare.
This is what I would expect the code to be but, alas, it doesn't work :p
ProxyRequests Off ProxyPass staging.server.com http:// staging.server.com ProxyPassReverse staging.server.com http:// staging.server.com
Now, I know using a proxy that the server is accessible because doing the following worked...
ProxyRequests Off ProxyPass /staging http:// staging.server.com ProxyPassReverse /staging http:// staging.server.com
(The http:// and staging.server.com were separated to avoid creating a link)
The above worked if the user entered server.com/staging which is not how we want it to work but I utilized as a test and would be able to live with for now. The only problem was none of the links on the page would link to the proper content on the staging server, instead it looked back on the demo machine.
And, while I'm at it, we also need to point server.com/Intranet to an IP address. Again, we have 2 routers, so R1 is where the internet comes into and R2 plugs into R1. R1 is 192.168.0.1, R2 is 192.168.0.55 with R2s range being 192.168.24.1. I need to point that address (server.com/Intranet) to 192.168.0.21. When doing this, I received all of the header information (webpage name and frame layout) but none of the content, receiving instead 404 errors for all 4 frames.
Any help on any of the above would be greatly appreciated.
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5659
45587 credits Members referred : 3
« Reply #1 on: Jun 02, 2009, 09:00:31 pm »
Never done that, but it look like a "job" for the squid web server. Have you tried that?
Google dot what?
Posts: 2
16 credits Members referred : 0
« Reply #2 on: Jun 02, 2009, 09:09:42 pm »
One of our clients utilized Squid about a year ago but I have not had experience with it personally. Based on what I have read about Apache and httpd.conf, I assumed that what I wanted to do would be possible with some simple redirects without needing to install any additional software.
Basically, before I head the direction of another add-on to our web server, I'm trying to exhaust all of my Apache configuration options.
Thanks for the fast response!
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=8826