Commit 3d7720a9 authored by Romain Courteaud's avatar Romain Courteaud

Allow to use Vary and state-if-error headers.

For unknown reason, using disk cache does not support vary.
refresh-pattern has to be configured to use state-if-error.
parent 26f9e635
refresh_pattern . 0 20% 4320 max-stale=604800
# Dissallow cachemgr access
http_access deny manager
# Squid service configuration
http_port %(ip)s:%(port)s accel vhost defaultsite=%(ip)s
acl dest_domain dstdomain %(ip)s
acl dest_addr dst %(ip)s
acl dest_port port %(port)s
http_access allow dest_addr dest_port dest_domain
# Finally deny all other access to this proxy
http_access deny all
# Service to cache
http_port %(ip)s:%(port)s accel defaultsite=%(ip)s
cache_peer %(backend_ip)s parent %(backend_port)s 0 no-query originserver name=backend
cache_peer_access backend allow dest_addr dest_port
acl our_sites dstdomain %(ip)s
http_access allow our_sites
cache_peer_access backend allow our_sites
cache_peer_access backend deny all
# # Drop squid headers
# Drop squid headers
# via off
# reply_header_access X-Cache-Lookup deny all
# reply_header_access X-Squid-Error deny all
......@@ -25,23 +23,10 @@ header_replace X-Forwarded-For
follow_x_forwarded_for allow all
forwarded_for on
# Admin email
# cache_mgr admin@example.org
# Use 1Go of RAM
cache_mem 1024 MB
# But do not keep big object in RAM
maximum_object_size_in_memory 2048 KB
# Use the disk cache instead
cache_dir ufs %(cache_path)s 2048 16 256
coredump_dir %(cache_path)s
# Everything is cacheable...
minimum_object_size 0 KB
# Except big ones!
maximum_object_size 64096 KB
cache_replacement_policy lru
# Log
access_log %(access_log_path)s
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment