Search squid archive

Re: Help getting to work squid in accel mode, newbie. Infinite Loop by .htaccess.

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

 



On Tue, 28 Jul 2009 12:10:54 -0500, Andres Salazar <ndrsslzr80@xxxxxxxxx>
wrote:
> I have isloated the issue due to this .htaccess file:
> 
> AddHandler application/x-httpd-php .html .htm
> AddType application/x-httpd-php .html .htm
> Options +FollowSymLinks
> RewriteEngine on
> 
> RewriteCond %{HTTP_HOST} ^protected-domain.com
> RewriteRule ^(.*)$ http://www.protected-domain.com/$1 [R=301,L]
> 
> RewriteCond %{THE_REQUEST} ^.*/index\.[a-z]{3,4}
> RewriteRule ^(.*)index\.[a-z]{3,4}$ http://www.protected-domain.com/$1
> [R=301,L]
> 
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ http://www.protected-domain.com/ [R=301,L]
> 
> This is causing the infinite loop while traffic is passed through the
> reverse proxy... Could anybody please advise me on why squid doesnt
> like this and how to correct it?

Ah, your squid.conf only lists this as the one and only accelerated domain:
  acl our_sites dstdomain protected_domain.com

This is whats is happening:
 browser requests http:/protected_domain.com/ for example
 When Apache sees that it sends a reply (301 location changed) to cause the
browser to make a brand new request for www.protected-domain.com.
 Squid sees that new requests as a non-accelerated one (due to the ACL not
matching) and handles it as a regular web request. With DNs pointing those
regular requests at Squid it asks itself on port 80 for
www.protected-domain.com and loops.

To fix it make the ACL:
   acl our_sites dstdomain .protected_domain.com

Amos

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux