httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandru David Constantinescu <ald...@gmail.com>
Subject [users@httpd] reverse proxy problem
Date Thu, 23 Oct 2008 13:02:57 GMT
Hello,

I have some problem with apache configurated as reverse proxy. I use 
httpd-2.2.3 rpm on Centos 5. I configure two servers : one is the proxy 
and the second is the real server. Both servers have internet connexions 
(the all idea is to switch from classic configuration to proxy 
configuration). On the real server I have virtual hosts configurated like :

<VirtualHost IP1:80>
   ServerName domain.tld
   ServerAdmin webmaster@domain.tld
   Redirect permanent / http://www.domain.tld/
</VirtualHost>

<VirtualHost IP1:80>
   ServerName www.domain.tld
   ServerAdmin webmaster@domain.tld
   DocumentRoot /home/sites/domain.tld/public_html
</VirtualHost>
....

On the proxy server I have :

<VirtualHost IP2:80>
     ServerName  www.domain.tld
     ServerAdmin webmaster@domain.tld
     ProxyPreserveHost On
     ProxyRequests Off

     ProxyPass        / http://IP1/
     ProxyPassReverse / http://IP1/

</VirtualHost>


<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
    CacheEnable disk /
    CacheRoot "/var/cache/mod_proxy"
    CacheDirLevels       5
    CacheDirLength       3
    CacheIgnoreNoLastMod On
    CacheDefaultExpire   3600

</IfModule>
</IfModule>


Both IP1 and IP2 are public ip's.

For now I play with 4 domains and the problem is that after a while all 
things get mess up.
Let's say I have domain1, domain2, domain3, and domain4.
If in browser I use www.domainN.tld all works perfect but without www 
not so perfect.
The most annoying thing is that after a while all domain 2,3,4 are 
redirected to domain1 and the access log get fill up with 301 errors
If anyone can tell me what is wrong with my configs or have any idea 
what can make such problems , please help me.

Alex

---------------------------------------------------------------------
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