I'm trying to setup squid in accelerator mode (without proxy).
I have http server running on one machine (port 80) - with virtual domains
on the same IP and squid on another machine (port 80).
config:
redirect_program /usr/local/squid/bin/ip-redirector.pl
redirect_rewrites_host_header off
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_uses_host_header on
ip-redirector.pl:
#!/usr/bin/perl
$|=1;
while (<>) {
s%http://[^/\s]+(\S*).*$%http://157.25.5.3$1%;
print "$_\n";
}
I have changed A records in DNS to point to my squid server.
Problem:
I start squid with empty cache. I request http://www.domain1.com/
Squid doesn't have this in cache, so it gets it from the real server:
941559641.822 176 157.25.192.3 TCP_MISS/200 10191 GET
http://www.domain1.com/ - DIRECT/157.25.5.3 text/html
OK. Fine.
Now I reqest www.domain2.com (virtual domain with the same IP address as
domain1.com)
941559660.580 8 157.25.192.3 TCP_MEM_HIT/200 10191 GET
http://www.domain2.com/ - NONE/- text/html
and it displays the previous page.
The same happens with other domains - always domain1 is displayed.
When the url contains directory (f.e. http://www.domain3.com/qqq/) - it is
displayed correctly.
I observed headres sent by squid to http server and I could see they are
correct. Header below was sent after pressing reload on www.domain3.com:
GET / HTTP/1.0
If-Modified-Since: Tue, 26 Oct 1999 12:31:37 GMT; length=9921
User-Agent: Mozilla/4.7 [en] (X11; U; Linux 2.2.12 i586)
Pragma: no-cache
Host: www.domain3.com
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
*/*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Via: 1.0 xxx.yyy.zzz:80 (Squid/2.2.STABLE2)
X-Forwarded-For: 157.25.192.3
Cache-Control: max-age=259200
Connection: keep-alive
So what is wrong with my configuration?
I can't make /etc/hosts with all accelerated domains, is there another way
of configuring the accelerator?
I have tried squid-2.2.STABLE5 and squid-2.2.STABLE2
Any suggestions?
Jacek
Received on Tue Nov 02 1999 - 10:55:28 MST
This archive was generated by hypermail pre-2.1.9 : Wed Apr 09 2008 - 11:57:31 MDT