reverse proxy problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
  Redirect permanent / http://www.domain.tld/
</VirtualHost>

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

On the proxy server I have :

<VirtualHost IP2:80>
    ServerName  www.domain.tld
    ServerAdmin webmaster@xxxxxxxxxx
    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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux