Maybe a combination of mod_proxy and mod_rewrite is what you're looking for. Something like this: RewriteCond %{HTTP_HOST} www.d1.com [NC] RewriteRule ^(.*) http://m1/$1 [P,L] RewriteCond %{HTTP_HOST} www.d2.com [NC] RewriteRule ^(.*) http://m2/$1 [P,L]I don't have a lot of experience with mod_rewrite, so the syntax might not be quite right, but perhaps someone else can follow up with any corrections.
Tom Michael D. Berger wrote:
If nothing else is suggested, I think that this could be done with NetFilter (http://www.netfilter.org/). Hopefully, something else will be suggested. Mike. -- Michael D. Bergerm.d.berger@xxxxxxxx-----Original Message-----From: Bart Heinsius [mailto:bheinsius@xxxxxxxxx] Sent: Sunday, November 06, 2005 9:14 AMTo: users@xxxxxxxxxxxxxxxxSubject: Re: [users@httpd] Configuring apache as a gateway for another domain on another serverFrom what I read in the documentation, mod_proxy works for routing requests for www.d1.com/myapp1 and www.d1.com/myapp2 (notice that both url's are in the d1.com domain) to be served by different servers on the internal network. What I want is to route requests for www.d1.com and www.d2.com to different servers (notice the difference in domain names), where www.d1.com and www.d2.com have the same ip address in the outside world dns. With Virtual Hosts I can manage different domain names to be served from different directories. With mod_proxy I can manage different url's on the same domain to be served by different servers. I need a combination of both: different domain names being served by different servers. Thanks, Bart. On 11/6/05, Nick Kew <nick@xxxxxxxxxxxx> wrote:On Sunday 06 November 2005 12:10, Bart Heinsius wrote:Hi,I have two servers on my internal network with apache onthem, letssay m1 and m2. I want to host two domains on my network, lets say www.d1.com andwww.d2.com. The router routes all external http requeststo server m1.External requests for www.d1.com should be processed byapache on serverm1. External requests for www.d2.com should be processedby apache onserver m2. How would I do this? I googled around and looked on apache.org which directed met to mod_proxy but I don't think that works in this situation.mod_proxy is exactly what you need. see also http://www.apacheweek.com/features/reverseproxies -- Nick Kew---------------------------------------------------------------------The official User-To-User support forum of the Apache HTTPServer 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--------------------------------------------------------------------- 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