Hi, All
Today I finished a routing for multiple hosts in my network.
The problem was:
I have only one class C IP ( 200.189.73.130 ), answering for two domains
( realad.com.br <http://www.realad.com.br> and realmedia.com.br ).
Both domains have a www host, so I have www.realad.com.br and
www.realmedia.com.br pointed to 200.189.73.130.
200.189.73.130 is a Red Hat 7.3 Linux box. My websites are in a Windows
2K machine, answering for 192.168.0.2 and 192.168.0.5. So realad is in
.2 and realmedia is in .5. The problem was: how could I route requests
from realad to 192.168.0.2:80 and requests from realmedia to
192.168.0.5:80 ?
I solved this using mod_proxy in apache. So, I have an apache web server
in the linux box, with tow virtual hosts routing for the Windows
machine... The steps were:
1) Compile apache with mod_proxy ( ./configure --enable-module=proxy
--enable-shared=proxy )
2) Remove HostHeaderName directive from IIS sites
3) Configure httpd.conf with virtual hosts, like this:
<VirtualHost 200.189.73.130>
ServerName www.realad.com.br
<IfModule mod_proxy.c>
ProxyRequests On
<Directory proxy:*>
Order deny,allow
Allow from all
</Directory>
ProxyPass / http://192.168.0.2:80/
ProxyPassReverse / http://192.168.0.2:80/
</IfModule>
</VirtualHost>
<VirtualHost 200.189.73.130>
ServerName www.realmedia.com.br
<IfModule mod_proxy.c>
ProxyRequests On
<Directory proxy:*>
Order deny,allow
Allow from all
</Directory>
ProxyPass / http://192.168.0.5:80/
ProxyPassReverse / http://192.168.0.5:80/
</IfModule>
</VirtualHost>
That''s it
Thanks a lot for all attention and help
Diogo Carlos Fernandes
Technical Support Manager
Real Media Latin America
www.realmedia.com
Phone .: 55+11+3842-2166
Mobile .: 55+11+9266-5325
e-mail .: dfernandes@realmedia.com