httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohamed Badri <moha...@netbadri.com>
Subject [users@httpd] Virtual hosts + Dynamic Vhosts + Mod_proxy
Date Mon, 12 Sep 2005 10:09:49 GMT
Hi,

I'm trying to configure apache to serve web-sites using dynamic  
vhosts and also intranets using mod_proxy,
this is a description about my config :

Srv1 : A web-server  who hosts  4 web-sites
Srv2 : A web-servers who hosts 3 web-sites

Internal users ( from 192.168.0.0 ) and external users ( from  
internet ) have only access to Srv1, And Srv1 had to serve
internal web-sites and also domains hosted by Srv2.

So all request comes to Srv1, In this server I use dynamic-vhosts with :

    VirtualDocumentRoot   /ot/www/hosts/%0/docs
    VirtualScriptAlias            /ot/www/hosts/%0/cgi-bin

For accessing Srv2 from Srv1, I'm trying to configure mod_proxy with  
virtual hosts, but it doesn't work :
In the following configuration , the internal ip of Srv1 is  
192.168.0.6, Srv2 is at 192.168.0.17
Internet Adress is A.B.C.D

web.ot.com, and asp.ot.com is hosted by Srv2. This is the 2 urls I  
need to redirect via mod_proxy to 192.168.0.17.

For now, Apache uses only the first Virtualhost, even if I put  
asp.ot.com section first.

Do you see something wrong ? Or it's not the right solution for this ?
thanks for any help.

-----------
UseCanonicalName Off
NameVirtualHost  192.168.0.6
NameVirtualHost  A.B.C.D

<VirtualHost A.B.C.D 192.168.0.6>
   ServerName                  exp.ot.com
   VirtualDocumentRoot /ot/www/hosts/%0/docs
   VirtualScriptAlias         /ot/www/hosts/%0/cgi-bin
   CustomLog                   logs/vhosts_access_log vcommon
   ErrorLog                        logs/vhosts_error_log
</VirtualHost>

<VirtualHost asp.ot.com>
    ServerName                asp.ot.com
    ServerAlias                  web.ot.com
    ProxyRequests            Off
    ProxyPass                    / http://192.168.0.17/
    ProxyPassReverse     / http://192.168.0.17/
    CustomLog                  logs/proxy_access_log vcommon
    ErrorLog                       logs/proxy_error_log
</VirtualHost> 
                                           

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message