Search squid archive

Squid3 accelerator mode example config?

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

 



I am trying to get Squid3 working in accelerator mode but I'm running into some beginner mistakes, clearly.

Can someone provide me a minimal config file that would accelerate a single site, always force requests to have that site in the Host: header sent to the origin, and obey the Cache-Control: max-age=xxx header coming back from the origin? Here's what I've got:

http_port 80 accel defaultsite=mysite.com vhost
http_access allow all
icp_port 0
redirect_rewrites_host_header off
cache_peer mysite.com parent 80 0 no-query originserver name=mysite.com forceddomain=mysite.com


If I access the cache at it's IP address (http://10.0.2.19/) it does not send the Host: mysite.com header back to the origin. If I use curl to inject a Host: header into the request, it does work. I want it to always inject that Host: header if it's missing.

Right now, the responses from the origin are coming back with the following headers:

HTTP/1.1 200 OK
Date: Wed, 09 Apr 2008 18:09:24 GMT
Server: Apache/2.2.3 (Unix) PHP/5.2.5
X-Powered-By: PHP/5.2.5
Cache-Control: max-age=15, must-revalidate
Content-Type: text/html; charset=UTF-8

Squid is not obeying the Cache-Control though. It always contacts the origin on every request.

Squid Cache: Version 3.0.STABLE4 on Ubuntu 7.10

-jsd-



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

  Powered by Linux