httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Tortolero" <roberto.tortol...@gmail.com>
Subject [users@httpd] Re: virtualhost via proxy on apache 2.0.40 problem
Date Fri, 27 Apr 2007 16:25:12 GMT
Hi
I have problem with proxys on apache, i have two servers and i want to use
one as a firewall an the other as web page server. i've all ready doned,
but, the thing is that apache always returned the same carpet all the time,
no matter what address i put, always redirect me to the first virtual host.
what should a do???

In the proxy server i have this on the httpd.conf:

#el vhost para direccionar al otro servidor
<VirtualHost xxx.xxx.xxx.77>
#ProxyPreserveHost on
ProxyPass / http://xxx.xxx.xxx.12/
ProxyPassReverse / http://xxx.xxx.xxx.12/

ServerName www.site1.com
</VirtualHost>

<VirtualHost xxx.xxx.xxx.77>
#ProxyRequests On
#ProxyVia On

#ProxyPreserveHost on
ProxyPass / http://xxx.xxx.xxx.12/
ProxyPassReverse / http://xxx.xxx.xxx.12/

ServerName www.site2.com
</VirtualHost>


and in the other server, the one that contains all the pages, have this
config:

<VirtualHost xxx.xxx.xxx.12>
VirtualDocumentRoot /usr/local/apache2/htdocs/site1/
ServerName www.site1.com
<Directory "/usr/local/apache2/htdocs/site1">
allow from all
Options +Indexes
</Directory>
</VirtualHost>


<VirtualHost xxx.xxx.xxx.12>
VirtualDocumentRoot /usr/local/apache2/htdocs/site2/
ServerName www.site2.com
<Directory "/usr/local/apache2/htdocs/site2">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

and no matter what address i put it always return me the first site on the
second server, that one with the pages, the first viartualhost on the secand
server.

Mime
View raw message