Apache : Forward request to another server

Alles, was den Apache betrifft, kann hier besprochen werden.

Apache : Forward request to another server

Postby tuty_richard » 10. February 2009 18:50

I have static IP set to my router. I am running two web servers. I have redirected my 80 port from the router to my server 1 its working fine. I need a help in setting up like this

I have domain say mydomain.com when ever I type mydomain.com in my browser it comes to my router then to my server 1 thats fine.

I have sub domain say sub.mydomain.com when ever I type sub.mydomain.com the router redirects to my webserver1. but what I need is my sub.mydomain has to be served by my server 2.

<VirtualHost *:80>
ServerName sub.mydomain
ServerAlias www.sub.mydomain
RewriteEngine On
RewriteRule ^(.*)$ http://192.168.0.101$1 [P]
</VirtualHost>

By adding this setup when ever I type sub.mydomain it redirects to my server 2 that is fine. But when my url changes to like sub.mydomain.com/mail the browser shows like http://192.168.0.101:80/mail. How to over come this problem please help me.

Thanks
Richard
tuty_richard
 
Posts: 3
Joined: 29. November 2008 15:43

Return to Apache

Who is online

Users browsing this forum: No registered users and 35 guests