1 ## Copyright (C) 1996-2016 The Squid Software Foundation and contributors
3 ## Squid software is distributed under GPLv2+ license and includes
4 ## contributions from numerous individuals and organizations.
5 ## Please see the COPYING and CONTRIBUTORS files for details.
10 ----------------------------
12 This is the documentation for the Squid configuration file.
13 This documentation can also be found online at:
14 http://www.squid-cache.org/Doc/config/
16 You may wish to look at the Squid home page and wiki for the
17 FAQ and other documentation:
18 http://www.squid-cache.org/
19 http://wiki.squid-cache.org/SquidFaq
20 http://wiki.squid-cache.org/ConfigExamples
22 This documentation shows what the defaults for various directives
23 happen to be. If you don't need to change the default, you should
24 leave the line out of your squid.conf in most cases.
26 In some cases "none" refers to no default setting at all,
27 while in other cases it refers to the value of the option
28 - the comments for that keyword indicate if this is the case.
33 Configuration options can be included using the "include" directive.
34 Include takes a list of files to include. Quoting and wildcards are
39 include /path/to/included/file/squid.acl.config
41 Includes can be nested up to a hard-coded depth of 16 levels.
42 This arbitrary restriction is to prevent recursive include references
43 from causing Squid entering an infinite loop whilst trying to load
46 Values with byte units
48 Squid accepts size units on some size related directives. All
49 such directives are documented with a default value displaying
52 Units accepted by Squid are:
54 KB - Kilobyte (1024 bytes)
58 Values with spaces, quotes, and other special characters
60 Squid supports directive parameters with spaces, quotes, and other
61 special characters. Surround such parameters with "double quotes". Use
62 the configuration_includes_quoted_values directive to enable or
65 Squid supports reading configuration option parameters from external
66 files using the syntax:
67 parameters("/path/filename")
69 acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
71 Conditional configuration
73 If-statements can be used to make configuration directives
77 ... regular configuration directives ...
79 ... regular configuration directives ...]
82 The else part is optional. The keywords "if", "else", and "endif"
83 must be typed on their own lines, as if they were regular
84 configuration directives.
86 NOTE: An else-if condition is not supported.
88 These individual conditions types are supported:
91 Always evaluates to true.
93 Always evaluates to false.
95 Equality comparison of two integer numbers.
100 The following SMP-related preprocessor macros can be used.
102 ${process_name} expands to the current Squid process "name"
103 (e.g., squid1, squid2, or cache1).
105 ${process_number} expands to the current Squid process
106 identifier, which is an integer number (e.g., 1, 2, 3) unique
107 across all Squid processes of the current service instance.
109 ${service_name} expands into the current Squid service instance
110 name identifier which is provided by -n on the command line.
114 Logformat macros can be used in many places outside of the logformat
115 directive. In theory, all of the logformat codes can be used as %macros,
116 where they are supported. In practice, a %macro expands as a dash (-) when
117 the transaction does not yet have enough information and a value is needed.
119 There is no definitive list of what tokens are available at the various
120 stages of the transaction.
122 And some information may already be available to Squid but not yet
123 committed where the macro expansion code can access it (report
124 such instances!). The macro will be expanded into a single dash
125 ('-') in such cases. Not all macros have been tested.
129 # options still not yet ported from 2.7 to 3.x
130 NAME: broken_vary_encoding
133 This option is not yet supported by Squid-3.
139 This option is not yet supported by Squid-3.
145 This option is not yet supported by Squid-3.
148 NAME: external_refresh_check
151 This option is not yet supported by Squid-3.
154 NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency
157 This option is not yet supported by Squid-3.
160 NAME: refresh_stale_hit
163 This option is not yet supported by Squid-3.
166 # Options removed in 4.x
167 NAME: cache_peer_domain cache_host_domain
170 Replace with dstdomain ACLs and cache_peer_access.
176 Remove this line. The behaviour enabled by this is no longer needed.
179 NAME: sslproxy_cafile
182 Remove this line. Use tls_outgoing_options cafile= instead.
185 NAME: sslproxy_capath
188 Remove this line. Use tls_outgoing_options capath= instead.
191 NAME: sslproxy_cipher
194 Remove this line. Use tls_outgoing_options cipher= instead.
197 NAME: sslproxy_client_certificate
200 Remove this line. Use tls_outgoing_options cert= instead.
203 NAME: sslproxy_client_key
206 Remove this line. Use tls_outgoing_options key= instead.
212 Remove this line. Use tls_outgoing_options flags= instead.
215 NAME: sslproxy_options
218 Remove this line. Use tls_outgoing_options options= instead.
221 NAME: sslproxy_version
224 Remove this line. Use tls_outgoing_options options= instead.
227 # Options removed in 3.5
228 NAME: hierarchy_stoplist
231 Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use.
234 # Options removed in 3.4
238 Remove this line. Use acls with access_log directives to control access logging
244 Remove this line. Use acls with icap_log directives to control icap logging
247 # Options Removed in 3.3
248 NAME: ignore_ims_on_miss
251 Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'.
254 # Options Removed in 3.2
255 NAME: chunked_request_body_max_size
258 Remove this line. Squid is now HTTP/1.1 compliant.
261 NAME: dns_v4_fallback
264 Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant.
267 NAME: emulate_httpd_log
270 Replace this with an access_log directive using the format 'common' or 'combined'.
276 Use a regular access.log with ACL limiting it to MISS events.
282 Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead.
285 NAME: ignore_expect_100
288 Remove this line. The HTTP/1.1 feature is now fully supported by default.
294 Remove this option from your config. To log FQDN use %>A in the log format.
297 NAME: log_ip_on_direct
300 Remove this option from your config. To log server or peer names use %<A in the log format.
303 NAME: maximum_single_addr_tries
306 Replaced by connect_retries. The behaviour has changed, please read the documentation before altering.
309 NAME: referer_log referrer_log
312 Replace this with an access_log directive using the format 'referrer'.
318 Remove this line. The feature is supported by default in storage types where update is implemented.
321 NAME: url_rewrite_concurrency
324 Remove this line. Set the 'concurrency=' option of url_rewrite_children instead.
330 Replace this with an access_log directive using the format 'useragent'.
333 # Options Removed in 3.1
337 Remove this line. DNS is no longer tested on startup.
340 NAME: extension_methods
343 Remove this line. All valid methods for HTTP are accepted by default.
346 # 2.7 Options Removed/Replaced in 3.2
351 # 2.7 Options Removed/Replaced in 3.1
359 Remove this line. HTTP/1.1 is supported by default.
362 NAME: upgrade_http0.9
365 Remove this line. ICY/1.0 streaming protocol is supported by default.
368 NAME: zph_local zph_mode zph_option zph_parent zph_sibling
371 Alter these entries. Use the qos_flows directive instead.
374 # Options Removed in 3.0
378 Since squid-3.0 replace with request_header_access or reply_header_access
379 depending on whether you wish to match client requests or server replies.
382 NAME: httpd_accel_no_pmtu_disc
385 Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead.
388 NAME: wais_relay_host
391 Replace this line with 'cache_peer' configuration.
394 NAME: wais_relay_port
397 Replace this line with 'cache_peer' configuration.
402 -----------------------------------------------------------------------------
409 DEFAULT_DOC: SMP support disabled.
411 Number of main Squid processes or "workers" to fork and maintain.
412 0: "no daemon" mode, like running "squid -N ..."
413 1: "no SMP" mode, start one main Squid process daemon (default)
414 N: start N main Squid process daemons (i.e., SMP mode)
416 In SMP mode, each worker does nearly all what a single Squid daemon
417 does (e.g., listen on http_port and forward HTTP requests).
420 NAME: cpu_affinity_map
422 LOC: Config.cpuAffinityMap
424 DEFAULT_DOC: Let operating system decide.
426 Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,...
428 Sets 1:1 mapping between Squid processes and CPU cores. For example,
430 cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
432 affects processes 1 through 4 only and places them on the first
433 four even cores, starting with core #1.
435 CPU cores are numbered starting from 1. Requires support for
436 sched_getaffinity(2) and sched_setaffinity(2) system calls.
438 Multiple cpu_affinity_map options are merged.
443 NAME: shared_memory_locking
446 LOC: Config.shmLocking
449 Whether to ensure that all required shared memory is available by
450 "locking" that shared memory into RAM when Squid starts. The
451 alternative is faster startup time followed by slightly slower
452 performance and, if not enough RAM is actually available during
453 runtime, mysterious crashes.
455 SMP Squid uses many shared memory segments. These segments are
456 brought into Squid memory space using an mmap(2) system call. During
457 Squid startup, the mmap() call often succeeds regardless of whether
458 the system has enough RAM. In general, Squid cannot tell whether the
459 kernel applies this "optimistic" memory allocation policy (but
460 popular modern kernels usually use it).
462 Later, if Squid attempts to actually access the mapped memory
463 regions beyond what the kernel is willing to allocate, the
464 "optimistic" kernel simply kills Squid kid with a SIGBUS signal.
465 Some of the memory limits enforced by the kernel are currently
466 poorly understood: We do not know how to detect and check them. This
467 option ensures that the mapped memory will be available.
469 This option may have a positive performance side-effect: Locking
470 memory at start avoids runtime paging I/O. Paging slows Squid down.
472 Locking memory may require a large enough RLIMIT_MEMLOCK OS limit,
473 CAP_IPC_LOCK capability, or equivalent.
477 OPTIONS FOR AUTHENTICATION
478 -----------------------------------------------------------------------------
487 This is used to define parameters for the various authentication
488 schemes supported by Squid.
490 format: auth_param scheme parameter [setting]
492 The order in which authentication schemes are presented to the client is
493 dependent on the order the scheme first appears in config file. IE
494 has a bug (it's not RFC 2617 compliant) in that it will use the basic
495 scheme if basic is the first entry presented, even if more secure
496 schemes are presented. For now use the order in the recommended
497 settings section below. If other browsers have difficulties (don't
498 recognize the schemes offered even if you are using basic) either
499 put basic first, or disable the other schemes (by commenting out their
502 Once an authentication scheme is fully configured, it can only be
503 shutdown by shutting squid down and restarting. Changes can be made on
504 the fly and activated with a reconfigure. I.E. You can change to a
505 different helper, but not unconfigure the helper completely.
507 Please note that while this directive defines how Squid processes
508 authentication it does not automatically activate authentication.
509 To use authentication you must in addition make use of ACLs based
510 on login name in http_access (proxy_auth, proxy_auth_regex or
511 external with %LOGIN used in the format tag). The browser will be
512 challenged for authentication on the first such acl encountered
513 in http_access processing and will also be re-challenged for new
514 login credentials if the request is being denied by a proxy_auth
517 WARNING: authentication can't be used in a transparently intercepting
518 proxy as the client then thinks it is talking to an origin server and
519 not the proxy. This is a limitation of bending the TCP/IP protocol to
520 transparently intercepting port 80, not a limitation in Squid.
521 Ports flagged 'transparent', 'intercept', or 'tproxy' have
522 authentication disabled.
524 === Parameters common to all schemes. ===
527 Specifies the command for the external authenticator.
529 By default, each authentication scheme is not used unless a
530 program is specified.
532 See http://wiki.squid-cache.org/Features/AddonHelpers for
533 more details on helper operations and creating your own.
536 Specifies a string to be append to request line format for
537 the authentication helper. "Quoted" format values may contain
538 spaces and logformat %macros. In theory, any logformat %macro
539 can be used. In practice, a %macro expands as a dash (-) if
540 the helper request is sent before the required macro
541 information is available to Squid.
543 By default, Squid uses request formats provided in
544 scheme-specific examples below (search for %credentials).
546 The expanded key_extras value is added to the Squid credentials
547 cache and, hence, will affect authentication. It can be used to
548 autenticate different users with identical user names (e.g.,
549 when user authentication depends on http_port).
551 Avoid adding frequently changing information to key_extras. For
552 example, if you add user source IP, and it changes frequently
553 in your environment, then max_user_ip ACL is going to treat
554 every user+IP combination as a unique "user", breaking the ACL
555 and wasting a lot of memory on those user records. It will also
556 force users to authenticate from scratch whenever their IP
560 Specifies the protection scope (aka realm name) which is to be
561 reported to the client for the authentication scheme. It is
562 commonly part of the text the user will see when prompted for
563 their username and password.
565 For Basic the default is "Squid proxy-caching web server".
566 For Digest there is no default, this parameter is mandatory.
567 For NTLM and Negotiate this parameter is ignored.
569 "children" numberofchildren [startup=N] [idle=N] [concurrency=N]
570 [queue-size=N] [on-persistent-overload=action]
572 The maximum number of authenticator processes to spawn. If
573 you start too few Squid will have to wait for them to process
574 a backlog of credential verifications, slowing it down. When
575 password verifications are done via a (slow) network you are
576 likely to need lots of authenticator processes.
578 The startup= and idle= options permit some skew in the exact
579 amount run. A minimum of startup=N will begin during startup
580 and reconfigure. Squid will start more in groups of up to
581 idle=N in an attempt to meet traffic needs and to keep idle=N
582 free above those traffic needs up to the maximum.
584 The concurrency= option sets the number of concurrent requests
585 the helper can process. The default of 0 is used for helpers
586 who only supports one request at a time. Setting this to a
587 number greater than 0 changes the protocol used to include a
588 channel ID field first on the request/response line, allowing
589 multiple requests to be sent to the same helper in parallel
590 without waiting for the response.
592 Concurrency must not be set unless it's known the helper
593 supports the input format with channel-ID fields.
595 The queue-size=N option sets the maximum number of queued
596 requests to N. The default maximum is 2*numberofchildren. Squid
597 is allowed to temporarily exceed the configured maximum, marking
598 the affected helper as "overloaded". If the helper overload
599 lasts more than 3 minutes, the action prescribed by the
600 on-persistent-overload option applies.
602 The on-persistent-overload=action option specifies Squid
603 reaction to a new helper request arriving when the helper
604 has been overloaded for more that 3 minutes already. The number
605 of queued requests determines whether the helper is overloaded
606 (see the queue-size option).
608 Two actions are supported:
610 die Squid worker quits. This is the default behavior.
612 ERR Squid treats the helper request as if it was
613 immediately submitted, and the helper immediately
614 replied with an ERR response. This action has no effect
615 on the already queued and in-progress helper requests.
617 NOTE: NTLM and Negotiate schemes do not support concurrency
618 in the Squid code module even though some helpers can.
621 IF HAVE_AUTH_MODULE_BASIC
622 === Basic authentication parameters ===
625 HTTP uses iso-latin-1 as character set, while some
626 authentication backends such as LDAP expects UTF-8. If this is
627 set to on Squid will translate the HTTP iso-latin-1 charset to
628 UTF-8 before sending the username and password to the helper.
630 "credentialsttl" timetolive
631 Specifies how long squid assumes an externally validated
632 username:password pair is valid for - in other words how
633 often the helper program is called for that user. Set this
634 low to force revalidation with short lived passwords.
636 NOTE: setting this high does not impact your susceptibility
637 to replay attacks unless you are using an one-time password
638 system (such as SecureID). If you are using such a system,
639 you will be vulnerable to replay attacks unless you also
640 use the max_user_ip ACL in an http_access rule.
642 "casesensitive" on|off
643 Specifies if usernames are case sensitive. Most user databases
644 are case insensitive allowing the same username to be spelled
645 using both lower and upper case letters, but some are case
646 sensitive. This makes a big difference for user_max_ip ACL
647 processing and similar.
650 IF HAVE_AUTH_MODULE_DIGEST
651 === Digest authentication parameters ===
654 HTTP uses iso-latin-1 as character set, while some
655 authentication backends such as LDAP expects UTF-8. If this is
656 set to on Squid will translate the HTTP iso-latin-1 charset to
657 UTF-8 before sending the username and password to the helper.
659 "nonce_garbage_interval" timeinterval
660 Specifies the interval that nonces that have been issued
661 to client_agent's are checked for validity.
663 "nonce_max_duration" timeinterval
664 Specifies the maximum length of time a given nonce will be
667 "nonce_max_count" number
668 Specifies the maximum number of times a given nonce can be
671 "nonce_strictness" on|off
672 Determines if squid requires strict increment-by-1 behavior
673 for nonce counts, or just incrementing (off - for use when
674 user agents generate nonce counts that occasionally miss 1
675 (ie, 1,2,4,6)). Default off.
677 "check_nonce_count" on|off
678 This directive if set to off can disable the nonce count check
679 completely to work around buggy digest qop implementations in
680 certain mainstream browser versions. Default on to check the
681 nonce count to protect from authentication replay attacks.
683 "post_workaround" on|off
684 This is a workaround to certain buggy browsers who send an
685 incorrect request digest in POST requests when reusing the
686 same nonce as acquired earlier on a GET request.
689 IF HAVE_AUTH_MODULE_NEGOTIATE
690 === Negotiate authentication parameters ===
693 If you experience problems with PUT/POST requests when using
694 the this authentication scheme then you can try setting this
695 to off. This will cause Squid to forcibly close the connection
696 on the initial request where the browser asks which schemes
697 are supported by the proxy.
700 IF HAVE_AUTH_MODULE_NTLM
701 === NTLM authentication parameters ===
704 If you experience problems with PUT/POST requests when using
705 the this authentication scheme then you can try setting this
706 to off. This will cause Squid to forcibly close the connection
707 on the initial request where the browser asks which schemes
708 are supported by the proxy.
711 === Example Configuration ===
713 This configuration displays the recommended authentication scheme
714 order from most to least secure with recommended minimum configuration
715 settings for each scheme:
717 #auth_param negotiate program <uncomment and complete this line to activate>
718 #auth_param negotiate children 20 startup=0 idle=1
719 #auth_param negotiate keep_alive on
721 #auth_param digest program <uncomment and complete this line to activate>
722 #auth_param digest children 20 startup=0 idle=1
723 #auth_param digest realm Squid proxy-caching web server
724 #auth_param digest nonce_garbage_interval 5 minutes
725 #auth_param digest nonce_max_duration 30 minutes
726 #auth_param digest nonce_max_count 50
728 #auth_param ntlm program <uncomment and complete this line to activate>
729 #auth_param ntlm children 20 startup=0 idle=1
730 #auth_param ntlm keep_alive on
732 #auth_param basic program <uncomment and complete this line>
733 #auth_param basic children 5 startup=5 idle=1
734 #auth_param basic realm Squid proxy-caching web server
735 #auth_param basic credentialsttl 2 hours
738 NAME: authenticate_cache_garbage_interval
741 LOC: Config.authenticateGCInterval
743 The time period between garbage collection across the username cache.
744 This is a trade-off between memory utilization (long intervals - say
745 2 days) and CPU (short intervals - say 1 minute). Only change if you
749 NAME: authenticate_ttl
752 LOC: Config.authenticateTTL
754 The time a user & their credentials stay in the logged in
755 user cache since their last request. When the garbage
756 interval passes, all user credentials that have passed their
757 TTL are removed from memory.
760 NAME: authenticate_ip_ttl
762 LOC: Config.authenticateIpTTL
765 If you use proxy authentication and the 'max_user_ip' ACL,
766 this directive controls how long Squid remembers the IP
767 addresses associated with each user. Use a small value
768 (e.g., 60 seconds) if your users might change addresses
769 quickly, as is the case with dialup. You might be safe
770 using a larger value (e.g., 2 hours) in a corporate LAN
771 environment with relatively static address assignments.
776 -----------------------------------------------------------------------------
779 NAME: external_acl_type
780 TYPE: externalAclHelper
781 LOC: Config.externalAclHelperList
784 This option defines external acl classes using a helper program
785 to look up the status
787 external_acl_type name [options] FORMAT /path/to/helper [helper arguments]
791 ttl=n TTL in seconds for cached results (defaults to 3600
795 TTL for cached negative lookups (default same
798 grace=n Percentage remaining of TTL where a refresh of a
799 cached entry should be initiated without needing to
800 wait for a new reply. (default is for no grace period)
802 cache=n The maximum number of entries in the result cache. The
803 default limit is 262144 entries. Each cache entry usually
804 consumes at least 256 bytes. Squid currently does not remove
805 expired cache entries until the limit is reached, so a proxy
806 will sooner or later reach the limit. The expanded FORMAT
807 value is used as the cache key, so if the details in FORMAT
808 are highly variable, a larger cache may be needed to produce
809 reduction in helper load.
812 Maximum number of acl helper processes spawned to service
813 external acl lookups of this type. (default 5)
816 Minimum number of acl helper processes to spawn during
817 startup and reconfigure to service external acl lookups
818 of this type. (default 0)
821 Number of acl helper processes to keep ahead of traffic
822 loads. Squid will spawn this many at once whenever load
823 rises above the capabilities of existing processes.
824 Up to the value of children-max. (default 1)
826 concurrency=n concurrency level per process. Only used with helpers
827 capable of processing more than one query at a time.
829 queue-size=N The queue-size= option sets the maximum number of queued
830 requests. If the queued requests exceed queue size
832 The default value is set to 2*children-max.
834 protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers.
836 ipv4 / ipv6 IP protocol used to communicate with this helper.
837 The default is to auto-detect IPv6 and use it when available.
840 FORMAT is a series of %macro codes. See logformat directive for a full list
841 of the accepted codes. Although note that at the time of any external ACL
842 being tested data may not be available and thus some %macro expand to '-'.
844 In addition to the logformat codes; when processing external ACLs these
845 additional macros are made available:
847 %ACL The name of the ACL being tested.
849 %DATA The ACL arguments specified in the referencing config
850 'acl ... external' line, separated by spaces (an
851 "argument string"). see acl external.
853 If there are no ACL arguments %DATA expands to '-'.
855 If you do not specify a DATA macro inside FORMAT,
856 Squid automatically appends %DATA to your FORMAT.
858 By default, Squid applies URL-encoding to each ACL
859 argument inside the argument string. If an explicit
860 encoding modifier is used (e.g., %#DATA), then Squid
861 encodes the whole argument string as a single token
862 (e.g., with %#DATA, spaces between arguments become
865 If SSL is enabled, the following formating codes become available:
867 %USER_CERT SSL User certificate in PEM format
868 %USER_CERTCHAIN SSL User certificate chain in PEM format
869 %USER_CERT_xx SSL User certificate subject attribute xx
870 %USER_CA_CERT_xx SSL User certificate issuer attribute xx
873 NOTE: all other format codes accepted by older Squid versions
877 General request syntax:
879 [channel-ID] FORMAT-values
882 FORMAT-values consists of transaction details expanded with
883 whitespace separation per the config file FORMAT specification
884 using the FORMAT macros listed above.
886 Request values sent to the helper are URL escaped to protect
887 each value in requests against whitespaces.
889 If using protocol=2.5 then the request sent to the helper is not
890 URL escaped to protect against whitespace.
892 NOTE: protocol=3.0 is deprecated as no longer necessary.
894 When using the concurrency= option the protocol is changed by
895 introducing a query channel tag in front of the request/response.
896 The query channel tag is a number between 0 and concurrency-1.
897 This value must be echoed back unchanged to Squid as the first part
898 of the response relating to its request.
901 The helper receives lines expanded per the above format specification
902 and for each input line returns 1 line starting with OK/ERR/BH result
903 code and optionally followed by additional keywords with more details.
906 General result syntax:
908 [channel-ID] result keyword=value ...
910 Result consists of one of the codes:
913 the ACL test produced a match.
916 the ACL test does not produce a match.
919 An internal error occurred in the helper, preventing
920 a result being identified.
922 The meaning of 'a match' is determined by your squid.conf
923 access control configuration. See the Squid wiki for details.
927 user= The users name (login)
929 password= The users password (for login= cache_peer option)
931 message= Message describing the reason for this response.
932 Available as %o in error pages.
933 Useful on (ERR and BH results).
935 tag= Apply a tag to a request. Only sets a tag once,
936 does not alter existing tags.
938 log= String to be logged in access.log. Available as
939 %ea in logformat specifications.
941 clt_conn_tag= Associates a TAG with the client TCP connection.
942 Please see url_rewrite_program related documentation
945 Any keywords may be sent on any response whether OK, ERR or BH.
947 All response keyword values need to be a single token with URL
948 escaping, or enclosed in double quotes (") and escaped using \ on
949 any double quotes or \ characters within the value. The wrapping
950 double quotes are removed before the value is interpreted by Squid.
951 \r and \n are also replace by CR and LF.
953 Some example key values:
957 user="J. \"Bob\" Smith"
964 DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED
965 DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID
966 DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
967 DEFAULT: ssl::certUntrusted ssl_error X509_V_ERR_INVALID_CA X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY X509_V_ERR_CERT_UNTRUSTED
968 DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
971 DEFAULT: manager url_regex -i ^cache_object:// +i ^https?://[^/]+/squid-internal-mgr/
972 DEFAULT: localhost src 127.0.0.1/32 ::1
973 DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
974 DEFAULT_DOC: ACLs all, manager, localhost, and to_localhost are predefined.
976 Defining an Access List
978 Every access list definition must begin with an aclname and acltype,
979 followed by either type-specific arguments or a quoted filename that
982 acl aclname acltype argument ...
983 acl aclname acltype "file" ...
985 When using "file", the file should contain one item per line.
990 Some acl types supports options which changes their default behaviour:
992 -i,+i By default, regular expressions are CASE-SENSITIVE. To make them
993 case-insensitive, use the -i option. To return case-sensitive
994 use the +i option between patterns, or make a new ACL line
997 -n Disable lookups and address type conversions. If lookup or
998 conversion is required because the parameter type (IP or
999 domain name) does not match the message address type (domain
1000 name or IP), then the ACL would immediately declare a mismatch
1001 without any warnings or lookups.
1004 Perform a list membership test, interpreting values as
1005 comma-separated token lists and matching against individual
1006 tokens instead of whole values.
1007 The optional "delimiters" parameter specifies one or more
1008 alternative non-alphanumeric delimiter characters.
1009 non-alphanumeric delimiter characters.
1011 -- Used to stop processing all options, in the case the first acl
1012 value has '-' character as first character (for example the '-'
1013 is a valid domain name)
1015 Some acl types require suspending the current request in order
1016 to access some external data source.
1017 Those which do are marked with the tag [slow], those which
1018 don't are marked as [fast].
1019 See http://wiki.squid-cache.org/SquidFaq/SquidAcl
1020 for further information
1022 ***** ACL TYPES AVAILABLE *****
1024 acl aclname src ip-address/mask ... # clients IP address [fast]
1025 acl aclname src addr1-addr2/mask ... # range of addresses [fast]
1026 acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow]
1027 acl aclname localip ip-address/mask ... # IP address the client connected to [fast]
1029 acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
1031 # The 'arp' ACL code is not portable to all operating systems.
1032 # It works on Linux, Solaris, Windows, FreeBSD, and some other
1035 # NOTE: Squid can only determine the MAC/EUI address for IPv4
1036 # clients that are on the same subnet. If the client is on a
1037 # different subnet, then Squid cannot find out its address.
1039 # NOTE 2: IPv6 protocol does not contain ARP. MAC/EUI is either
1040 # encoded directly in the IPv6 address or not available.
1042 acl aclname srcdomain .foo.com ...
1043 # reverse lookup, from client IP [slow]
1044 acl aclname dstdomain [-n] .foo.com ...
1045 # Destination server from URL [fast]
1046 acl aclname srcdom_regex [-i] \.foo\.com ...
1047 # regex matching client name [slow]
1048 acl aclname dstdom_regex [-n] [-i] \.foo\.com ...
1049 # regex matching server [fast]
1051 # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
1052 # based URL is used and no match is found. The name "none" is used
1053 # if the reverse lookup fails.
1055 acl aclname src_as number ...
1056 acl aclname dst_as number ...
1058 # Except for access control, AS numbers can be used for
1059 # routing of requests to specific caches. Here's an
1060 # example for routing all requests for AS#1241 and only
1061 # those to mycache.mydomain.net:
1062 # acl asexample dst_as 1241
1063 # cache_peer_access mycache.mydomain.net allow asexample
1064 # cache_peer_access mycache_mydomain.net deny all
1066 acl aclname peername myPeer ...
1068 # match against a named cache_peer entry
1069 # set unique name= on cache_peer lines for reliable use.
1071 acl aclname time [day-abbrevs] [h1:m1-h2:m2]
1081 # h1:m1 must be less than h2:m2
1083 acl aclname url_regex [-i] ^http:// ...
1084 # regex matching on whole URL [fast]
1085 acl aclname urllogin [-i] [^a-zA-Z0-9] ...
1086 # regex matching on URL login field
1087 acl aclname urlpath_regex [-i] \.gif$ ...
1088 # regex matching on URL path [fast]
1090 acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
1092 acl aclname localport 3128 ... # TCP port the client connected to [fast]
1093 # NP: for interception mode this is usually '80'
1095 acl aclname myportname 3128 ... # *_port name [fast]
1097 acl aclname proto HTTP FTP ... # request protocol [fast]
1099 acl aclname method GET POST ... # HTTP request method [fast]
1101 acl aclname http_status 200 301 500- 400-403 ...
1102 # status code in reply [fast]
1104 acl aclname browser [-i] regexp ...
1105 # pattern match on User-Agent header (see also req_header below) [fast]
1107 acl aclname referer_regex [-i] regexp ...
1108 # pattern match on Referer header [fast]
1109 # Referer is highly unreliable, so use with care
1111 acl aclname ident username ...
1112 acl aclname ident_regex [-i] pattern ...
1113 # string match on ident output [slow]
1114 # use REQUIRED to accept any non-null ident.
1116 acl aclname proxy_auth [-i] username ...
1117 acl aclname proxy_auth_regex [-i] pattern ...
1118 # perform http authentication challenge to the client and match against
1119 # supplied credentials [slow]
1121 # takes a list of allowed usernames.
1122 # use REQUIRED to accept any valid username.
1124 # Will use proxy authentication in forward-proxy scenarios, and plain
1125 # http authenticaiton in reverse-proxy scenarios
1127 # NOTE: when a Proxy-Authentication header is sent but it is not
1128 # needed during ACL checking the username is NOT logged
1131 # NOTE: proxy_auth requires a EXTERNAL authentication program
1132 # to check username/password combinations (see
1133 # auth_param directive).
1135 # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
1136 # as the browser needs to be configured for using a proxy in order
1137 # to respond to proxy authentication.
1139 acl aclname snmp_community string ...
1140 # A community string to limit access to your SNMP Agent [fast]
1143 # acl snmppublic snmp_community public
1145 acl aclname maxconn number
1146 # This will be matched when the client's IP address has
1147 # more than <number> TCP connections established. [fast]
1148 # NOTE: This only measures direct TCP links so X-Forwarded-For
1149 # indirect clients are not counted.
1151 acl aclname max_user_ip [-s] number
1152 # This will be matched when the user attempts to log in from more
1153 # than <number> different ip addresses. The authenticate_ip_ttl
1154 # parameter controls the timeout on the ip entries. [fast]
1155 # If -s is specified the limit is strict, denying browsing
1156 # from any further IP addresses until the ttl has expired. Without
1157 # -s Squid will just annoy the user by "randomly" denying requests.
1158 # (the counter is reset each time the limit is reached and a
1159 # request is denied)
1160 # NOTE: in acceleration mode or where there is mesh of child proxies,
1161 # clients may appear to come from multiple addresses if they are
1162 # going through proxy farms, so a limit of 1 may cause user problems.
1164 acl aclname random probability
1165 # Pseudo-randomly match requests. Based on the probability given.
1166 # Probability may be written as a decimal (0.333), fraction (1/3)
1167 # or ratio of matches:non-matches (3:5).
1169 acl aclname req_mime_type [-i] mime-type ...
1170 # regex match against the mime type of the request generated
1171 # by the client. Can be used to detect file upload or some
1172 # types HTTP tunneling requests [fast]
1173 # NOTE: This does NOT match the reply. You cannot use this
1174 # to match the returned file type.
1176 acl aclname req_header header-name [-i] any\.regex\.here
1177 # regex match against any of the known request headers. May be
1178 # thought of as a superset of "browser", "referer" and "mime-type"
1181 acl aclname rep_mime_type [-i] mime-type ...
1182 # regex match against the mime type of the reply received by
1183 # squid. Can be used to detect file download or some
1184 # types HTTP tunneling requests. [fast]
1185 # NOTE: This has no effect in http_access rules. It only has
1186 # effect in rules that affect the reply data stream such as
1187 # http_reply_access.
1189 acl aclname rep_header header-name [-i] any\.regex\.here
1190 # regex match against any of the known reply headers. May be
1191 # thought of as a superset of "browser", "referer" and "mime-type"
1194 acl aclname external class_name [arguments...]
1195 # external ACL lookup via a helper class defined by the
1196 # external_acl_type directive [slow]
1198 acl aclname user_cert attribute values...
1199 # match against attributes in a user SSL certificate
1200 # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
1202 acl aclname ca_cert attribute values...
1203 # match against attributes a users issuing CA SSL certificate
1204 # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
1206 acl aclname ext_user username ...
1207 acl aclname ext_user_regex [-i] pattern ...
1208 # string match on username returned by external acl helper [slow]
1209 # use REQUIRED to accept any non-null user name.
1211 acl aclname tag tagvalue ...
1212 # string match on tag returned by external acl helper [fast]
1213 # DEPRECATED. Only the first tag will match with this ACL.
1214 # Use the 'note' ACL instead for handling multiple tag values.
1216 acl aclname hier_code codename ...
1217 # string match against squid hierarchy code(s); [fast]
1218 # e.g., DIRECT, PARENT_HIT, NONE, etc.
1220 # NOTE: This has no effect in http_access rules. It only has
1221 # effect in rules that affect the reply data stream such as
1222 # http_reply_access.
1224 acl aclname note [-m[=delimiters]] name [value ...]
1225 # match transaction annotation [fast]
1226 # Without values, matches any annotation with a given name.
1227 # With value(s), matches any annotation with a given name that
1228 # also has one of the given values.
1229 # If the -m flag is used, then the value of the named
1230 # annotation is interpreted as a list of tokens, and the ACL
1231 # matches individual name=token pairs rather than whole
1232 # name=value pairs. See "ACL Options" above for more info.
1233 # Annotation sources include note and adaptation_meta directives
1234 # as well as helper and eCAP responses.
1236 acl aclname adaptation_service service ...
1237 # Matches the name of any icap_service, ecap_service,
1238 # adaptation_service_set, or adaptation_service_chain that Squid
1239 # has used (or attempted to use) for the master transaction.
1240 # This ACL must be defined after the corresponding adaptation
1241 # service is named in squid.conf. This ACL is usable with
1242 # adaptation_meta because it starts matching immediately after
1243 # the service has been selected for adaptation.
1246 acl aclname ssl_error errorname
1247 # match against SSL certificate validation error [fast]
1249 # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt
1252 # The following can be used as shortcuts for certificate properties:
1253 # [ssl::]certHasExpired: the "not after" field is in the past
1254 # [ssl::]certNotYetValid: the "not before" field is in the future
1255 # [ssl::]certUntrusted: The certificate issuer is not to be trusted.
1256 # [ssl::]certSelfSigned: The certificate is self signed.
1257 # [ssl::]certDomainMismatch: The certificate CN domain does not
1258 # match the name the name of the host we are connecting to.
1260 # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch,
1261 # ssl::certUntrusted, and ssl::certSelfSigned can also be used as
1262 # predefined ACLs, just like the 'all' ACL.
1264 # NOTE: The ssl_error ACL is only supported with sslproxy_cert_error,
1265 # sslproxy_cert_sign, and sslproxy_cert_adapt options.
1267 acl aclname server_cert_fingerprint [-sha1] fingerprint
1268 # match against server SSL certificate fingerprint [fast]
1270 # The fingerprint is the digest of the DER encoded version
1271 # of the whole certificate. The user should use the form: XX:XX:...
1272 # Optional argument specifies the digest algorithm to use.
1273 # The SHA1 digest algorithm is the default and is currently
1274 # the only algorithm supported (-sha1).
1276 acl aclname at_step step
1277 # match against the current step during ssl_bump evaluation [fast]
1278 # Never matches and should not be used outside the ssl_bump context.
1280 # At each SslBump step, Squid evaluates ssl_bump directives to find
1281 # the next bumping action (e.g., peek or splice). Valid SslBump step
1282 # values and the corresponding ssl_bump evaluation moments are:
1283 # SslBump1: After getting TCP-level and HTTP CONNECT info.
1284 # SslBump2: After getting SSL Client Hello info.
1285 # SslBump3: After getting SSL Server Hello info.
1287 acl aclname ssl::server_name .foo.com ...
1288 # matches server name obtained from various sources [fast]
1290 # The server name is obtained during Ssl-Bump steps from such sources
1291 # as CONNECT request URI, client SNI, and SSL server certificate CN.
1292 # During each Ssl-Bump step, Squid may improve its understanding of a
1293 # "true server name". Unlike dstdomain, this ACL does not perform
1295 # The "none" name can be used to match transactions where Squid
1296 # could not compute the server name using any information source
1297 # already available at the ACL evaluation time.
1299 acl aclname ssl::server_name_regex [-i] \.foo\.com ...
1300 # regex matches server name obtained from various sources [fast]
1302 acl aclname connections_encrypted
1303 # matches transactions with all HTTP messages received over TLS
1304 # transport connections. [fast]
1306 # The master transaction deals with HTTP messages received from
1307 # various sources. All sources used by the master transaction in the
1308 # past are considered by the ACL. The following rules define whether
1309 # a given message source taints the entire master transaction,
1310 # resulting in ACL mismatches:
1312 # * The HTTP client transport connection is not TLS.
1313 # * An adaptation service connection-encryption flag is off.
1314 # * The peer or origin server transport connection is not TLS.
1316 # Caching currently does not affect these rules. This cache ignorance
1317 # implies that only the current HTTP client transport and REQMOD
1318 # services status determine whether this ACL matches a from-cache
1319 # transaction. The source of the cached response does not have any
1320 # effect on future transaction that use the cached response without
1321 # revalidation. This may change.
1323 # DNS, ICP, and HTCP exchanges during the master transaction do not
1324 # affect these rules.
1326 acl aclname any-of acl1 acl2 ...
1327 # match any one of the acls [fast or slow]
1328 # The first matching ACL stops further ACL evaluation.
1330 # ACLs from multiple any-of lines with the same name are ORed.
1331 # For example, A = (a1 or a2) or (a3 or a4) can be written as
1332 # acl A any-of a1 a2
1333 # acl A any-of a3 a4
1335 # This group ACL is fast if all evaluated ACLs in the group are fast
1336 # and slow otherwise.
1338 acl aclname all-of acl1 acl2 ...
1339 # match all of the acls [fast or slow]
1340 # The first mismatching ACL stops further ACL evaluation.
1342 # ACLs from multiple all-of lines with the same name are ORed.
1343 # For example, B = (b1 and b2) or (b3 and b4) can be written as
1344 # acl B all-of b1 b2
1345 # acl B all-of b3 b4
1347 # This group ACL is fast if all evaluated ACLs in the group are fast
1348 # and slow otherwise.
1351 acl macaddress arp 09:00:2b:23:45:67
1352 acl myexample dst_as 1241
1353 acl password proxy_auth REQUIRED
1354 acl fileupload req_mime_type -i ^multipart/form-data$
1355 acl javascript rep_mime_type -i ^application/x-javascript$
1359 # Recommended minimum configuration:
1362 # Example rule allowing access from your local networks.
1363 # Adapt to list your (internal) IP networks from where browsing
1365 acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
1366 acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
1367 acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
1368 acl localhet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
1369 acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
1370 acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
1371 acl localnet src fc00::/7 # RFC 4193 local private network range
1372 acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
1374 acl SSL_ports port 443
1375 acl Safe_ports port 80 # http
1376 acl Safe_ports port 21 # ftp
1377 acl Safe_ports port 443 # https
1378 acl Safe_ports port 70 # gopher
1379 acl Safe_ports port 210 # wais
1380 acl Safe_ports port 1025-65535 # unregistered ports
1381 acl Safe_ports port 280 # http-mgmt
1382 acl Safe_ports port 488 # gss-http
1383 acl Safe_ports port 591 # filemaker
1384 acl Safe_ports port 777 # multiling http
1385 acl CONNECT method CONNECT
1389 NAME: proxy_protocol_access
1391 LOC: Config.accessList.proxyProtocol
1393 DEFAULT_DOC: all TCP connections to ports with require-proxy-header will be denied
1395 Determine which client proxies can be trusted to provide correct
1396 information regarding real client IP address using PROXY protocol.
1398 Requests may pass through a chain of several other proxies
1399 before reaching us. The original source details may by sent in:
1400 * HTTP message Forwarded header, or
1401 * HTTP message X-Forwarded-For header, or
1402 * PROXY protocol connection header.
1404 This directive is solely for validating new PROXY protocol
1405 connections received from a port flagged with require-proxy-header.
1406 It is checked only once after TCP connection setup.
1408 A deny match results in TCP connection closure.
1410 An allow match is required for Squid to permit the corresponding
1411 TCP connection, before Squid even looks for HTTP request headers.
1412 If there is an allow match, Squid starts using PROXY header information
1413 to determine the source address of the connection for all future ACL
1414 checks, logging, etc.
1416 SECURITY CONSIDERATIONS:
1418 Any host from which we accept client IP details can place
1419 incorrect information in the relevant header, and Squid
1420 will use the incorrect information as if it were the
1421 source address of the request. This may enable remote
1422 hosts to bypass any access control restrictions that are
1423 based on the client's source addresses.
1425 This clause only supports fast acl types.
1426 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1429 NAME: follow_x_forwarded_for
1431 IFDEF: FOLLOW_X_FORWARDED_FOR
1432 LOC: Config.accessList.followXFF
1433 DEFAULT_IF_NONE: deny all
1434 DEFAULT_DOC: X-Forwarded-For header will be ignored.
1436 Determine which client proxies can be trusted to provide correct
1437 information regarding real client IP address.
1439 Requests may pass through a chain of several other proxies
1440 before reaching us. The original source details may by sent in:
1441 * HTTP message Forwarded header, or
1442 * HTTP message X-Forwarded-For header, or
1443 * PROXY protocol connection header.
1445 PROXY protocol connections are controlled by the proxy_protocol_access
1446 directive which is checked before this.
1448 If a request reaches us from a source that is allowed by this
1449 directive, then we trust the information it provides regarding
1450 the IP of the client it received from (if any).
1452 For the purpose of ACLs used in this directive the src ACL type always
1453 matches the address we are testing and srcdomain matches its rDNS.
1455 On each HTTP request Squid checks for X-Forwarded-For header fields.
1456 If found the header values are iterated in reverse order and an allow
1457 match is required for Squid to continue on to the next value.
1458 The verification ends when a value receives a deny match, cannot be
1459 tested, or there are no more values to test.
1460 NOTE: Squid does not yet follow the Forwarded HTTP header.
1462 The end result of this process is an IP address that we will
1463 refer to as the indirect client address. This address may
1464 be treated as the client address for access control, ICAP, delay
1465 pools and logging, depending on the acl_uses_indirect_client,
1466 icap_uses_indirect_client, delay_pool_uses_indirect_client,
1467 log_uses_indirect_client and tproxy_uses_indirect_client options.
1469 This clause only supports fast acl types.
1470 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1472 SECURITY CONSIDERATIONS:
1474 Any host from which we accept client IP details can place
1475 incorrect information in the relevant header, and Squid
1476 will use the incorrect information as if it were the
1477 source address of the request. This may enable remote
1478 hosts to bypass any access control restrictions that are
1479 based on the client's source addresses.
1483 acl localhost src 127.0.0.1
1484 acl my_other_proxy srcdomain .proxy.example.com
1485 follow_x_forwarded_for allow localhost
1486 follow_x_forwarded_for allow my_other_proxy
1489 NAME: acl_uses_indirect_client
1492 IFDEF: FOLLOW_X_FORWARDED_FOR
1494 LOC: Config.onoff.acl_uses_indirect_client
1496 Controls whether the indirect client address
1497 (see follow_x_forwarded_for) is used instead of the
1498 direct client address in acl matching.
1500 NOTE: maxconn ACL considers direct TCP links and indirect
1501 clients will always have zero. So no match.
1504 NAME: delay_pool_uses_indirect_client
1507 IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS
1509 LOC: Config.onoff.delay_pool_uses_indirect_client
1511 Controls whether the indirect client address
1512 (see follow_x_forwarded_for) is used instead of the
1513 direct client address in delay pools.
1516 NAME: log_uses_indirect_client
1519 IFDEF: FOLLOW_X_FORWARDED_FOR
1521 LOC: Config.onoff.log_uses_indirect_client
1523 Controls whether the indirect client address
1524 (see follow_x_forwarded_for) is used instead of the
1525 direct client address in the access log.
1528 NAME: tproxy_uses_indirect_client
1531 IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER
1533 LOC: Config.onoff.tproxy_uses_indirect_client
1535 Controls whether the indirect client address
1536 (see follow_x_forwarded_for) is used instead of the
1537 direct client address when spoofing the outgoing client.
1539 This has no effect on requests arriving in non-tproxy
1542 SECURITY WARNING: Usage of this option is dangerous
1543 and should not be used trivially. Correct configuration
1544 of follow_x_forwarded_for with a limited set of trusted
1545 sources is required to prevent abuse of your proxy.
1548 NAME: spoof_client_ip
1550 LOC: Config.accessList.spoof_client_ip
1552 DEFAULT_DOC: Allow spoofing on all TPROXY traffic.
1554 Control client IP address spoofing of TPROXY traffic based on
1555 defined access lists.
1557 spoof_client_ip allow|deny [!]aclname ...
1559 If there are no "spoof_client_ip" lines present, the default
1560 is to "allow" spoofing of any suitable request.
1562 Note that the cache_peer "no-tproxy" option overrides this ACL.
1564 This clause supports fast acl types.
1565 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1570 LOC: Config.accessList.http
1571 DEFAULT_IF_NONE: deny all
1572 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1574 Allowing or Denying access based on defined access lists
1576 To allow or deny a message received on an HTTP, HTTPS, or FTP port:
1577 http_access allow|deny [!]aclname ...
1579 NOTE on default values:
1581 If there are no "access" lines present, the default is to deny
1584 If none of the "access" lines cause a match, the default is the
1585 opposite of the last line in the list. If the last line was
1586 deny, the default is allow. Conversely, if the last line
1587 is allow, the default will be deny. For these reasons, it is a
1588 good idea to have an "deny all" entry at the end of your access
1589 lists to avoid potential confusion.
1591 This clause supports both fast and slow acl types.
1592 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1597 # Recommended minimum Access Permission configuration:
1599 # Deny requests to certain unsafe ports
1600 http_access deny !Safe_ports
1602 # Deny CONNECT to other than secure SSL ports
1603 http_access deny CONNECT !SSL_ports
1605 # Only allow cachemgr access from localhost
1606 http_access allow localhost manager
1607 http_access deny manager
1609 # We strongly recommend the following be uncommented to protect innocent
1610 # web applications running on the proxy server who think the only
1611 # one who can access services on "localhost" is a local user
1612 #http_access deny to_localhost
1615 # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
1618 # Example rule allowing access from your local networks.
1619 # Adapt localnet in the ACL section to list your (internal) IP networks
1620 # from where browsing should be allowed
1621 http_access allow localnet
1622 http_access allow localhost
1624 # And finally deny all other access to this proxy
1625 http_access deny all
1629 NAME: adapted_http_access http_access2
1631 LOC: Config.accessList.adapted_http
1633 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1635 Allowing or Denying access based on defined access lists
1637 Essentially identical to http_access, but runs after redirectors
1638 and ICAP/eCAP adaptation. Allowing access control based on their
1641 If not set then only http_access is used.
1644 NAME: http_reply_access
1646 LOC: Config.accessList.reply
1648 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1650 Allow replies to client requests. This is complementary to http_access.
1652 http_reply_access allow|deny [!] aclname ...
1654 NOTE: if there are no access lines present, the default is to allow
1657 If none of the access lines cause a match the opposite of the
1658 last line will apply. Thus it is good practice to end the rules
1659 with an "allow all" or "deny all" entry.
1661 This clause supports both fast and slow acl types.
1662 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1667 LOC: Config.accessList.icp
1669 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1671 Allowing or Denying access to the ICP port based on defined
1674 icp_access allow|deny [!]aclname ...
1676 NOTE: The default if no icp_access lines are present is to
1677 deny all traffic. This default may cause problems with peers
1680 This clause only supports fast acl types.
1681 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1683 # Allow ICP queries from local networks only
1684 #icp_access allow localnet
1685 #icp_access deny all
1691 LOC: Config.accessList.htcp
1693 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1695 Allowing or Denying access to the HTCP port based on defined
1698 htcp_access allow|deny [!]aclname ...
1700 See also htcp_clr_access for details on access control for
1701 cache purge (CLR) HTCP messages.
1703 NOTE: The default if no htcp_access lines are present is to
1704 deny all traffic. This default may cause problems with peers
1705 using the htcp option.
1707 This clause only supports fast acl types.
1708 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1710 # Allow HTCP queries from local networks only
1711 #htcp_access allow localnet
1712 #htcp_access deny all
1715 NAME: htcp_clr_access
1718 LOC: Config.accessList.htcp_clr
1720 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1722 Allowing or Denying access to purge content using HTCP based
1723 on defined access lists.
1724 See htcp_access for details on general HTCP access control.
1726 htcp_clr_access allow|deny [!]aclname ...
1728 This clause only supports fast acl types.
1729 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1731 # Allow HTCP CLR requests from trusted peers
1732 acl htcp_clr_peer src 192.0.2.2 2001:DB8::2
1733 htcp_clr_access allow htcp_clr_peer
1734 htcp_clr_access deny all
1739 LOC: Config.accessList.miss
1741 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1743 Determines whether network access is permitted when satisfying a request.
1746 to force your neighbors to use you as a sibling instead of
1749 acl localclients src 192.0.2.0/24 2001:DB8::a:0/64
1750 miss_access deny !localclients
1751 miss_access allow all
1753 This means only your local clients are allowed to fetch relayed/MISS
1754 replies from the network and all other clients can only fetch cached
1757 The default for this setting allows all clients who passed the
1758 http_access rules to relay via this proxy.
1760 This clause only supports fast acl types.
1761 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1764 NAME: ident_lookup_access
1768 DEFAULT_DOC: Unless rules exist in squid.conf, IDENT is not fetched.
1769 LOC: Ident::TheConfig.identLookup
1771 A list of ACL elements which, if matched, cause an ident
1772 (RFC 931) lookup to be performed for this request. For
1773 example, you might choose to always perform ident lookups
1774 for your main multi-user Unix boxes, but not for your Macs
1775 and PCs. By default, ident lookups are not performed for
1778 To enable ident lookups for specific client addresses, you
1779 can follow this example:
1781 acl ident_aware_hosts src 198.168.1.0/24
1782 ident_lookup_access allow ident_aware_hosts
1783 ident_lookup_access deny all
1785 Only src type ACL checks are fully supported. A srcdomain
1786 ACL might work at times, but it will not always provide
1789 This clause only supports fast acl types.
1790 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1793 NAME: reply_body_max_size
1794 COMMENT: size [acl acl...]
1797 DEFAULT_DOC: No limit is applied.
1798 LOC: Config.ReplyBodySize
1800 This option specifies the maximum size of a reply body. It can be
1801 used to prevent users from downloading very large files, such as
1802 MP3's and movies. When the reply headers are received, the
1803 reply_body_max_size lines are processed, and the first line where
1804 all (if any) listed ACLs are true is used as the maximum body size
1807 This size is checked twice. First when we get the reply headers,
1808 we check the content-length value. If the content length value exists
1809 and is larger than the allowed size, the request is denied and the
1810 user receives an error message that says "the request or reply
1811 is too large." If there is no content-length, and the reply
1812 size exceeds this limit, the client's connection is just closed
1813 and they will receive a partial reply.
1815 WARNING: downstream caches probably can not detect a partial reply
1816 if there is no content-length header, so they will cache
1817 partial responses and give them out as hits. You should NOT
1818 use this option if you have downstream caches.
1820 WARNING: A maximum size smaller than the size of squid's error messages
1821 will cause an infinite loop and crash squid. Ensure that the smallest
1822 non-zero value you use is greater that the maximum header size plus
1823 the size of your largest error page.
1825 If you set this parameter none (the default), there will be
1828 Configuration Format is:
1829 reply_body_max_size SIZE UNITS [acl ...]
1831 reply_body_max_size 10 MB
1835 NAME: on_unsupported_protocol
1836 TYPE: on_unsupported_protocol
1837 LOC: Config.accessList.on_unsupported_protocol
1839 DEFAULT_DOC: Respond with an error message to unidentifiable traffic
1841 Determines Squid behavior when encountering strange requests at the
1842 beginning of an accepted TCP connection or the beginning of a bumped
1843 CONNECT tunnel. Controlling Squid reaction to unexpected traffic is
1844 especially useful in interception environments where Squid is likely
1845 to see connections for unsupported protocols that Squid should either
1846 terminate or tunnel at TCP level.
1848 on_unsupported_protocol <action> [!]acl ...
1850 The first matching action wins. Only fast ACLs are supported.
1852 Supported actions are:
1854 tunnel: Establish a TCP connection with the intended server and
1855 blindly shovel TCP packets between the client and server.
1857 respond: Respond with an error message, using the transfer protocol
1858 for the Squid port that received the request (e.g., HTTP
1859 for connections intercepted at the http_port). This is the
1862 Squid expects the following traffic patterns:
1864 http_port: a plain HTTP request
1865 https_port: SSL/TLS handshake followed by an [encrypted] HTTP request
1866 ftp_port: a plain FTP command (no on_unsupported_protocol support yet!)
1867 CONNECT tunnel on http_port: same as https_port
1868 CONNECT tunnel on https_port: same as https_port
1870 Currently, this directive has effect on intercepted connections and
1871 bumped tunnels only. Other cases are not supported because Squid
1872 cannot know the intended destination of other traffic.
1875 # define what Squid errors indicate receiving non-HTTP traffic:
1876 acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG
1877 # define what Squid errors indicate receiving nothing:
1878 acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT
1879 # tunnel everything that does not look like HTTP:
1880 on_unsupported_protocol tunnel foreignProtocol
1881 # tunnel if we think the client waits for the server to talk first:
1882 on_unsupported_protocol tunnel serverTalksFirstProtocol
1883 # in all other error cases, just send an HTTP "error page" response:
1884 on_unsupported_protocol respond all
1886 See also: squid_error ACL
1891 -----------------------------------------------------------------------------
1894 NAME: http_port ascii_port
1899 Usage: port [mode] [options]
1900 hostname:port [mode] [options]
1901 1.2.3.4:port [mode] [options]
1903 The socket addresses where Squid will listen for HTTP client
1904 requests. You may specify multiple socket addresses.
1905 There are three forms: port alone, hostname with port, and
1906 IP address with port. If you specify a hostname or IP
1907 address, Squid binds the socket to that specific
1908 address. Most likely, you do not need to bind to a specific
1909 address, so you can use the port number alone.
1911 If you are running Squid in accelerator mode, you
1912 probably want to listen on port 80 also, or instead.
1914 The -a command line option may be used to specify additional
1915 port(s) where Squid listens for proxy request. Such ports will
1916 be plain proxy ports with no options.
1918 You may specify multiple socket addresses on multiple lines.
1922 intercept Support for IP-Layer NAT interception delivering
1923 traffic to this Squid port.
1924 NP: disables authentication on the port.
1926 tproxy Support Linux TPROXY (or BSD divert-to) with spoofing
1927 of outgoing connections using the client IP address.
1928 NP: disables authentication on the port.
1930 accel Accelerator / reverse proxy mode
1932 ssl-bump For each CONNECT request allowed by ssl_bump ACLs,
1933 establish secure connection with the client and with
1934 the server, decrypt HTTPS messages as they pass through
1935 Squid, and treat them as unencrypted HTTP messages,
1936 becoming the man-in-the-middle.
1938 The ssl_bump option is required to fully enable
1939 bumping of CONNECT requests.
1941 Omitting the mode flag causes default forward proxy mode to be used.
1944 Accelerator Mode Options:
1946 defaultsite=domainname
1947 What to use for the Host: header if it is not present
1948 in a request. Determines what site (not origin server)
1949 accelerators should consider the default.
1951 no-vhost Disable using HTTP/1.1 Host header for virtual domain support.
1953 protocol= Protocol to reconstruct accelerated and intercepted
1954 requests with. Defaults to HTTP/1.1 for http_port and
1955 HTTPS/1.1 for https_port.
1956 When an unsupported value is configured Squid will
1957 produce a FATAL error.
1958 Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1
1960 vport Virtual host port support. Using the http_port number
1961 instead of the port passed on Host: headers.
1963 vport=NN Virtual host port support. Using the specified port
1964 number instead of the port passed on Host: headers.
1967 Act as if this Squid is the origin server.
1968 This currently means generate new Date: and Expires:
1969 headers on HIT instead of adding Age:.
1971 ignore-cc Ignore request Cache-Control headers.
1973 WARNING: This option violates HTTP specifications if
1974 used in non-accelerator setups.
1976 allow-direct Allow direct forwarding in accelerator mode. Normally
1977 accelerated requests are denied direct forwarding as if
1978 never_direct was used.
1980 WARNING: this option opens accelerator mode to security
1981 vulnerabilities usually only affecting in interception
1982 mode. Make sure to protect forwarding with suitable
1983 http_access rules when using this.
1986 SSL Bump Mode Options:
1987 In addition to these options ssl-bump requires TLS/SSL options.
1989 generate-host-certificates[=<on|off>]
1990 Dynamically create SSL server certificates for the
1991 destination hosts of bumped CONNECT requests.When
1992 enabled, the cert and key options are used to sign
1993 generated certificates. Otherwise generated
1994 certificate will be selfsigned.
1995 If there is a CA certificate lifetime of the generated
1996 certificate equals lifetime of the CA certificate. If
1997 generated certificate is selfsigned lifetime is three
1999 This option is enabled by default when ssl-bump is used.
2000 See the ssl-bump option above for more information.
2002 dynamic_cert_mem_cache_size=SIZE
2003 Approximate total RAM size spent on cached generated
2004 certificates. If set to zero, caching is disabled. The
2005 default value is 4MB.
2009 cert= Path to SSL certificate (PEM format).
2011 key= Path to SSL private key file (PEM format)
2012 if not specified, the certificate file is
2013 assumed to be a combined certificate and
2016 cipher= Colon separated list of supported ciphers.
2017 NOTE: some ciphers such as EDH ciphers depend on
2018 additional settings. If those settings are
2019 omitted the ciphers may be silently ignored
2020 by the OpenSSL library.
2022 options= Various SSL implementation options. The most important
2025 NO_SSLv3 Disallow the use of SSLv3
2027 NO_TLSv1 Disallow the use of TLSv1.0
2029 NO_TLSv1_1 Disallow the use of TLSv1.1
2031 NO_TLSv1_2 Disallow the use of TLSv1.2
2034 Always create a new key when using
2035 temporary/ephemeral DH key exchanges
2038 Enable ephemeral ECDH key exchange.
2039 The adopted curve should be specified
2040 using the tls-dh option.
2043 Disable use of RFC5077 session tickets.
2044 Some servers may have problems
2045 understanding the TLS extension due
2046 to ambiguous specification in RFC4507.
2048 ALL Enable various bug workarounds
2049 suggested as "harmless" by OpenSSL
2050 Be warned that this reduces SSL/TLS
2051 strength to some attacks.
2053 See the OpenSSL SSL_CTX_set_options documentation for a
2056 clientca= File containing the list of CAs to use when
2057 requesting a client certificate.
2059 tls-cafile= PEM file containing CA certificates to use when verifying
2060 client certificates. If not configured clientca will be
2061 used. May be repeated to load multiple files.
2063 capath= Directory containing additional CA certificates
2064 and CRL lists to use when verifying client certificates.
2065 Requires OpenSSL or LibreSSL.
2067 crlfile= File of additional CRL lists to use when verifying
2068 the client certificate, in addition to CRLs stored in
2069 the capath. Implies VERIFY_CRL flag below.
2072 File containing DH parameters for temporary/ephemeral DH key
2073 exchanges, optionally prefixed by a curve for ephemeral ECDH
2075 See OpenSSL documentation for details on how to create the
2076 DH parameter file. Supported curves for ECDH can be listed
2077 using the "openssl ecparam -list_curves" command.
2078 WARNING: EDH and EECDH ciphers will be silently disabled if
2079 this option is not set.
2081 sslflags= Various flags modifying the use of SSL:
2083 Don't request client certificates
2084 immediately, but wait until acl processing
2085 requires a certificate (not yet implemented).
2087 Don't allow for session reuse. Each connection
2088 will result in a new SSL session.
2090 Verify CRL lists when accepting client
2093 Verify CRL lists for all certificates in the
2094 client certificate chain.
2096 tls-default-ca[=off]
2097 Whether to use the system Trusted CAs. Default is OFF.
2099 tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1.
2101 sslcontext= SSL session ID context identifier.
2105 connection-auth[=on|off]
2106 use connection-auth=off to tell Squid to prevent
2107 forwarding Microsoft connection oriented authentication
2108 (NTLM, Negotiate and Kerberos)
2110 disable-pmtu-discovery=
2111 Control Path-MTU discovery usage:
2112 off lets OS decide on what to do (default).
2113 transparent disable PMTU discovery when transparent
2115 always disable always PMTU discovery.
2117 In many setups of transparently intercepting proxies
2118 Path-MTU discovery can not work on traffic towards the
2119 clients. This is the case when the intercepting device
2120 does not fully track connections and fails to forward
2121 ICMP must fragment messages to the cache server. If you
2122 have such setup and experience that certain clients
2123 sporadically hang or never complete requests set
2124 disable-pmtu-discovery option to 'transparent'.
2126 name= Specifies a internal name for the port. Defaults to
2127 the port specification (port or addr:port)
2129 tcpkeepalive[=idle,interval,timeout]
2130 Enable TCP keepalive probes of idle connections.
2131 In seconds; idle is the initial time before TCP starts
2132 probing the connection, interval how often to probe, and
2133 timeout the time before giving up.
2135 require-proxy-header
2136 Require PROXY protocol version 1 or 2 connections.
2137 The proxy_protocol_access is required to whitelist
2138 downstream proxies which can be trusted.
2140 If you run Squid on a dual-homed machine with an internal
2141 and an external interface we recommend you to specify the
2142 internal address:port in http_port. This way Squid will only be
2143 visible on the internal address.
2147 # Squid normally listens to port 3128
2148 http_port @DEFAULT_HTTP_PORT@
2153 IFDEF: USE_GNUTLS||USE_OPENSSL
2158 Usage: [ip:]port [mode] cert=certificate.pem [options]
2160 The socket address where Squid will listen for client requests made
2161 over TLS or SSL connections. Commonly referred to as HTTPS.
2163 This is most useful for situations where you are running squid in
2164 accelerator mode and you want to do the TLS work at the accelerator level.
2166 You may specify multiple socket addresses on multiple lines,
2167 each with their own certificate and/or options.
2169 The TLS cert= option is mandatory on HTTPS ports.
2171 See http_port for a list of modes and options.
2179 Enables Native FTP proxy by specifying the socket address where Squid
2180 listens for FTP client requests. See http_port directive for various
2181 ways to specify the listening address and mode.
2183 Usage: ftp_port address [mode] [options]
2185 WARNING: This is a new, experimental, complex feature that has seen
2186 limited production exposure. Some Squid modules (e.g., caching) do not
2187 currently work with native FTP proxying, and many features have not
2188 even been tested for compatibility. Test well before deploying!
2190 Native FTP proxying differs substantially from proxying HTTP requests
2191 with ftp:// URIs because Squid works as an FTP server and receives
2192 actual FTP commands (rather than HTTP requests with FTP URLs).
2194 Native FTP commands accepted at ftp_port are internally converted or
2195 wrapped into HTTP-like messages. The same happens to Native FTP
2196 responses received from FTP origin servers. Those HTTP-like messages
2197 are shoveled through regular access control and adaptation layers
2198 between the FTP client and the FTP origin server. This allows Squid to
2199 examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP
2200 mechanisms when shoveling wrapped FTP messages. For example,
2201 http_access and adaptation_access directives are used.
2205 intercept Same as http_port intercept. The FTP origin address is
2206 determined based on the intended destination of the
2207 intercepted connection.
2209 tproxy Support Linux TPROXY for spoofing outgoing
2210 connections using the client IP address.
2211 NP: disables authentication and maybe IPv6 on the port.
2213 By default (i.e., without an explicit mode option), Squid extracts the
2214 FTP origin address from the login@origin parameter of the FTP USER
2215 command. Many popular FTP clients support such native FTP proxying.
2219 name=token Specifies an internal name for the port. Defaults to
2220 the port address. Usable with myportname ACL.
2223 Enables tracking of FTP directories by injecting extra
2224 PWD commands and adjusting Request-URI (in wrapping
2225 HTTP requests) to reflect the current FTP server
2226 directory. Tracking is disabled by default.
2228 protocol=FTP Protocol to reconstruct accelerated and intercepted
2229 requests with. Defaults to FTP. No other accepted
2230 values have been tested with. An unsupported value
2231 results in a FATAL error. Accepted values are FTP,
2232 HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1).
2234 Other http_port modes and options that are not specific to HTTP and
2235 HTTPS may also work.
2238 NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp
2241 LOC: Ip::Qos::TheConfig.tosToServer
2243 Allows you to select a TOS/Diffserv value for packets outgoing
2244 on the server side, based on an ACL.
2246 tcp_outgoing_tos ds-field [!]aclname ...
2248 Example where normal_service_net uses the TOS value 0x00
2249 and good_service_net uses 0x20
2251 acl normal_service_net src 10.0.0.0/24
2252 acl good_service_net src 10.0.1.0/24
2253 tcp_outgoing_tos 0x00 normal_service_net
2254 tcp_outgoing_tos 0x20 good_service_net
2256 TOS/DSCP values really only have local significance - so you should
2257 know what you're specifying. For more information, see RFC2474,
2258 RFC2475, and RFC3260.
2260 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
2261 "default" to use whatever default your host has.
2262 Note that only multiples of 4 are usable as the two rightmost bits have
2263 been redefined for use by ECN (RFC 3168 section 23.1).
2264 The squid parser will enforce this by masking away the ECN bits.
2266 Processing proceeds in the order specified, and stops at first fully
2269 Only fast ACLs are supported.
2272 NAME: clientside_tos
2275 LOC: Ip::Qos::TheConfig.tosToClient
2277 Allows you to select a TOS/DSCP value for packets being transmitted
2278 on the client-side, based on an ACL.
2280 clientside_tos ds-field [!]aclname ...
2282 Example where normal_service_net uses the TOS value 0x00
2283 and good_service_net uses 0x20
2285 acl normal_service_net src 10.0.0.0/24
2286 acl good_service_net src 10.0.1.0/24
2287 clientside_tos 0x00 normal_service_net
2288 clientside_tos 0x20 good_service_net
2290 Note: This feature is incompatible with qos_flows. Any TOS values set here
2291 will be overwritten by TOS values in qos_flows.
2293 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
2294 "default" to use whatever default your host has.
2295 Note that only multiples of 4 are usable as the two rightmost bits have
2296 been redefined for use by ECN (RFC 3168 section 23.1).
2297 The squid parser will enforce this by masking away the ECN bits.
2301 NAME: tcp_outgoing_mark
2303 IFDEF: SO_MARK&&USE_LIBCAP
2305 LOC: Ip::Qos::TheConfig.nfmarkToServer
2307 Allows you to apply a Netfilter mark value to outgoing packets
2308 on the server side, based on an ACL.
2310 tcp_outgoing_mark mark-value [!]aclname ...
2312 Example where normal_service_net uses the mark value 0x00
2313 and good_service_net uses 0x20
2315 acl normal_service_net src 10.0.0.0/24
2316 acl good_service_net src 10.0.1.0/24
2317 tcp_outgoing_mark 0x00 normal_service_net
2318 tcp_outgoing_mark 0x20 good_service_net
2320 Only fast ACLs are supported.
2323 NAME: clientside_mark
2325 IFDEF: SO_MARK&&USE_LIBCAP
2327 LOC: Ip::Qos::TheConfig.nfmarkToClient
2329 Allows you to apply a Netfilter mark value to packets being transmitted
2330 on the client-side, based on an ACL.
2332 clientside_mark mark-value [!]aclname ...
2334 Example where normal_service_net uses the mark value 0x00
2335 and good_service_net uses 0x20
2337 acl normal_service_net src 10.0.0.0/24
2338 acl good_service_net src 10.0.1.0/24
2339 clientside_mark 0x00 normal_service_net
2340 clientside_mark 0x20 good_service_net
2342 Note: This feature is incompatible with qos_flows. Any mark values set here
2343 will be overwritten by mark values in qos_flows.
2350 LOC: Ip::Qos::TheConfig
2352 Allows you to select a TOS/DSCP value to mark outgoing
2353 connections to the client, based on where the reply was sourced.
2354 For platforms using netfilter, allows you to set a netfilter mark
2355 value instead of, or in addition to, a TOS value.
2357 By default this functionality is disabled. To enable it with the default
2358 settings simply use "qos_flows mark" or "qos_flows tos". Default
2359 settings will result in the netfilter mark or TOS value being copied
2360 from the upstream connection to the client. Note that it is the connection
2361 CONNMARK value not the packet MARK value that is copied.
2363 It is not currently possible to copy the mark or TOS value from the
2364 client to the upstream connection request.
2366 TOS values really only have local significance - so you should
2367 know what you're specifying. For more information, see RFC2474,
2368 RFC2475, and RFC3260.
2370 The TOS/DSCP byte must be exactly that - a octet value 0 - 255.
2371 Note that only multiples of 4 are usable as the two rightmost bits have
2372 been redefined for use by ECN (RFC 3168 section 23.1).
2373 The squid parser will enforce this by masking away the ECN bits.
2375 Mark values can be any unsigned 32-bit integer value.
2377 This setting is configured by setting the following values:
2379 tos|mark Whether to set TOS or netfilter mark values
2381 local-hit=0xFF Value to mark local cache hits.
2383 sibling-hit=0xFF Value to mark hits from sibling peers.
2385 parent-hit=0xFF Value to mark hits from parent peers.
2387 miss=0xFF[/mask] Value to mark cache misses. Takes precedence
2388 over the preserve-miss feature (see below), unless
2389 mask is specified, in which case only the bits
2390 specified in the mask are written.
2392 The TOS variant of the following features are only possible on Linux
2393 and require your kernel to be patched with the TOS preserving ZPH
2394 patch, available from http://zph.bratcheda.org
2395 No patch is needed to preserve the netfilter mark, which will work
2396 with all variants of netfilter.
2398 disable-preserve-miss
2399 This option disables the preservation of the TOS or netfilter
2400 mark. By default, the existing TOS or netfilter mark value of
2401 the response coming from the remote server will be retained
2402 and masked with miss-mark.
2403 NOTE: in the case of a netfilter mark, the mark must be set on
2404 the connection (using the CONNMARK target) not on the packet
2408 Allows you to mask certain bits in the TOS or mark value
2409 received from the remote server, before copying the value to
2410 the TOS sent towards clients.
2411 Default for tos: 0xFF (TOS from server is not changed).
2412 Default for mark: 0xFFFFFFFF (mark from server is not changed).
2414 All of these features require the --enable-zph-qos compilation flag
2415 (enabled by default). Netfilter marking also requires the
2416 libnetfilter_conntrack libraries (--with-netfilter-conntrack) and
2417 libcap 2.09+ (--with-libcap).
2421 NAME: tcp_outgoing_address
2424 DEFAULT_DOC: Address selection is performed by the operating system.
2425 LOC: Config.accessList.outgoing_address
2427 Allows you to map requests to different outgoing IP addresses
2428 based on the username or source address of the user making
2431 tcp_outgoing_address ipaddr [[!]aclname] ...
2434 Forwarding clients with dedicated IPs for certain subnets.
2436 acl normal_service_net src 10.0.0.0/24
2437 acl good_service_net src 10.0.2.0/24
2439 tcp_outgoing_address 2001:db8::c001 good_service_net
2440 tcp_outgoing_address 10.1.0.2 good_service_net
2442 tcp_outgoing_address 2001:db8::beef normal_service_net
2443 tcp_outgoing_address 10.1.0.1 normal_service_net
2445 tcp_outgoing_address 2001:db8::1
2446 tcp_outgoing_address 10.1.0.3
2448 Processing proceeds in the order specified, and stops at first fully
2451 Squid will add an implicit IP version test to each line.
2452 Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses.
2453 Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses.
2456 NOTE: The use of this directive using client dependent ACLs is
2457 incompatible with the use of server side persistent connections. To
2458 ensure correct results it is best to set server_persistent_connections
2459 to off when using this directive in such configurations.
2461 NOTE: The use of this directive to set a local IP on outgoing TCP links
2462 is incompatible with using TPROXY to set client IP out outbound TCP links.
2463 When needing to contact peers use the no-tproxy cache_peer option and the
2464 client_dst_passthru directive re-enable normal forwarding such as this.
2468 NAME: host_verify_strict
2471 LOC: Config.onoff.hostStrictVerify
2473 Regardless of this option setting, when dealing with intercepted
2474 traffic, Squid always verifies that the destination IP address matches
2475 the Host header domain or IP (called 'authority form URL').
2477 This enforcement is performed to satisfy a MUST-level requirement in
2478 RFC 2616 section 14.23: "The Host field value MUST represent the naming
2479 authority of the origin server or gateway given by the original URL".
2482 Squid always responds with an HTTP 409 (Conflict) error
2483 page and logs a security warning if there is no match.
2485 Squid verifies that the destination IP address matches
2486 the Host header for forward-proxy and reverse-proxy traffic
2487 as well. For those traffic types, Squid also enables the
2488 following checks, comparing the corresponding Host header
2489 and Request-URI components:
2491 * The host names (domain or IP) must be identical,
2492 but valueless or missing Host header disables all checks.
2493 For the two host names to match, both must be either IP
2496 * Port numbers must be identical, but if a port is missing
2497 the scheme-default port is assumed.
2500 When set to OFF (the default):
2501 Squid allows suspicious requests to continue but logs a
2502 security warning and blocks caching of the response.
2504 * Forward-proxy traffic is not checked at all.
2506 * Reverse-proxy traffic is not checked at all.
2508 * Intercepted traffic which passes verification is handled
2509 according to client_dst_passthru.
2511 * Intercepted requests which fail verification are sent
2512 to the client original destination instead of DIRECT.
2513 This overrides 'client_dst_passthru off'.
2515 For now suspicious intercepted CONNECT requests are always
2516 responded to with an HTTP 409 (Conflict) error page.
2521 As described in CVE-2009-0801 when the Host: header alone is used
2522 to determine the destination of a request it becomes trivial for
2523 malicious scripts on remote websites to bypass browser same-origin
2524 security policy and sandboxing protections.
2526 The cause of this is that such applets are allowed to perform their
2527 own HTTP stack, in which case the same-origin policy of the browser
2528 sandbox only verifies that the applet tries to contact the same IP
2529 as from where it was loaded at the IP level. The Host: header may
2530 be different from the connected IP and approved origin.
2534 NAME: client_dst_passthru
2537 LOC: Config.onoff.client_dst_passthru
2539 With NAT or TPROXY intercepted traffic Squid may pass the request
2540 directly to the original client destination IP or seek a faster
2541 source using the HTTP Host header.
2543 Using Host to locate alternative servers can provide faster
2544 connectivity with a range of failure recovery options.
2545 But can also lead to connectivity trouble when the client and
2546 server are attempting stateful interactions unaware of the proxy.
2548 This option (on by default) prevents alternative DNS entries being
2549 located to send intercepted traffic DIRECT to an origin server.
2550 The clients original destination IP and port will be used instead.
2552 Regardless of this option setting, when dealing with intercepted
2553 traffic Squid will verify the Host: header and any traffic which
2554 fails Host verification will be treated as if this option were ON.
2556 see host_verify_strict for details on the verification process.
2561 -----------------------------------------------------------------------------
2564 NAME: tls_outgoing_options
2565 IFDEF: USE_GNUTLS||USE_OPENSSL
2566 TYPE: securePeerOptions
2567 DEFAULT: min-version=1.0
2568 LOC: Security::ProxyOutgoingConfig
2570 disable Do not support https:// URLs.
2572 cert=/path/to/client/certificate
2573 A client TLS certificate to use when connecting.
2575 key=/path/to/client/private_key
2576 The private TLS key corresponding to the cert= above.
2577 If key= is not specified cert= is assumed to reference
2578 a PEM file containing both the certificate and the key.
2580 cipher=... The list of valid TLS ciphers to use.
2583 The minimum TLS protocol version to permit.
2584 To control SSLv3 use the options= parameter.
2585 Supported Values: 1.0 (default), 1.1, 1.2
2587 options=... Specify various TLS/SSL implementation options:
2589 NO_SSLv3 Disallow the use of SSLv3
2591 NO_TLSv1 Disallow the use of TLSv1.0
2593 NO_TLSv1_1 Disallow the use of TLSv1.1
2595 NO_TLSv1_2 Disallow the use of TLSv1.2
2598 Always create a new key when using
2599 temporary/ephemeral DH key exchanges
2602 Disable use of RFC5077 session tickets.
2603 Some servers may have problems
2604 understanding the TLS extension due
2605 to ambiguous specification in RFC4507.
2607 ALL Enable various bug workarounds
2608 suggested as "harmless" by OpenSSL
2609 Be warned that this reduces SSL/TLS
2610 strength to some attacks.
2612 See the OpenSSL SSL_CTX_set_options documentation for a
2615 cafile= PEM file containing CA certificates to use when verifying
2616 the peer certificate. May be repeated to load multiple files.
2618 capath= A directory containing additional CA certificates to
2619 use when verifying the peer certificate.
2620 Requires OpenSSL or LibreSSL.
2622 crlfile=... A certificate revocation list file to use when
2623 verifying the peer certificate.
2625 flags=... Specify various flags modifying the TLS implementation:
2628 Accept certificates even if they fail to
2631 Don't verify the peer certificate
2632 matches the server name
2635 Whether to use the system Trusted CAs. Default is ON.
2637 domain= The peer name as advertised in its certificate.
2638 Used for verifying the correctness of the received peer
2639 certificate. If not specified the peer hostname will be
2645 -----------------------------------------------------------------------------
2648 NAME: ssl_unclean_shutdown
2652 LOC: Config.SSL.unclean_shutdown
2654 Some browsers (especially MSIE) bugs out on SSL shutdown
2661 LOC: Config.SSL.ssl_engine
2664 The OpenSSL engine to use. You will need to set this if you
2665 would like to use hardware SSL acceleration for example.
2668 NAME: sslproxy_session_ttl
2671 LOC: Config.SSL.session_ttl
2674 Sets the timeout value for SSL sessions
2677 NAME: sslproxy_session_cache_size
2680 LOC: Config.SSL.sessionCacheSize
2683 Sets the cache size to use for ssl session
2686 NAME: sslproxy_foreign_intermediate_certs
2689 LOC: Config.ssl_client.foreignIntermediateCertsPath
2692 Many origin servers fail to send their full server certificate
2693 chain for verification, assuming the client already has or can
2694 easily locate any missing intermediate certificates.
2696 Squid uses the certificates from the specified file to fill in
2697 these missing chains when trying to validate origin server
2700 The file is expected to contain zero or more PEM-encoded
2701 intermediate certificates. These certificates are not treated
2702 as trusted root certificates, and any self-signed certificate in
2703 this file will be ignored.
2706 NAME: sslproxy_cert_sign_hash
2709 LOC: Config.SSL.certSignHash
2712 Sets the hashing algorithm to use when signing generated certificates.
2713 Valid algorithm names depend on the OpenSSL library used. The following
2714 names are usually available: sha1, sha256, sha512, and md5. Please see
2715 your OpenSSL library manual for the available hashes. By default, Squids
2716 that support this option use sha256 hashes.
2718 Squid does not forcefully purge cached certificates that were generated
2719 with an algorithm other than the currently configured one. They remain
2720 in the cache, subject to the regular cache eviction policy, and become
2721 useful if the algorithm changes again.
2726 TYPE: sslproxy_ssl_bump
2727 LOC: Config.accessList.ssl_bump
2728 DEFAULT_DOC: Become a TCP tunnel without decrypting proxied traffic.
2731 This option is consulted when a CONNECT request is received on
2732 an http_port (or a new connection is intercepted at an
2733 https_port), provided that port was configured with an ssl-bump
2734 flag. The subsequent data on the connection is either treated as
2735 HTTPS and decrypted OR tunneled at TCP level without decryption,
2736 depending on the first matching bumping "action".
2738 ssl_bump <action> [!]acl ...
2740 The following bumping actions are currently supported:
2743 Become a TCP tunnel without decrypting proxied traffic.
2744 This is the default action.
2747 Establish a secure connection with the server and, using a
2748 mimicked server certificate, with the client.
2751 Receive client (step SslBump1) or server (step SslBump2)
2752 certificate while preserving the possibility of splicing the
2753 connection. Peeking at the server certificate (during step 2)
2754 usually precludes bumping of the connection at step 3.
2757 Receive client (step SslBump1) or server (step SslBump2)
2758 certificate while preserving the possibility of bumping the
2759 connection. Staring at the server certificate (during step 2)
2760 usually precludes splicing of the connection at step 3.
2763 Close client and server connections.
2765 Backward compatibility actions available at step SslBump1:
2768 Bump the connection. Establish a secure connection with the
2769 client first, then connect to the server. This old mode does
2770 not allow Squid to mimic server SSL certificate and does not
2771 work with intercepted SSL connections.
2774 Bump the connection. Establish a secure connection with the
2775 server first, then establish a secure connection with the
2776 client, using a mimicked server certificate. Works with both
2777 CONNECT requests and intercepted SSL connections, but does
2778 not allow to make decisions based on SSL handshake info.
2781 Decide whether to bump or splice the connection based on
2782 client-to-squid and server-to-squid SSL hello messages.
2786 Same as the "splice" action.
2788 All ssl_bump rules are evaluated at each of the supported bumping
2789 steps. Rules with actions that are impossible at the current step are
2790 ignored. The first matching ssl_bump action wins and is applied at the
2791 end of the current step. If no rules match, the splice action is used.
2792 See the at_step ACL for a list of the supported SslBump steps.
2794 This clause supports both fast and slow acl types.
2795 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2797 See also: http_port ssl-bump, https_port ssl-bump, and acl at_step.
2800 # Example: Bump all TLS connections except those originating from
2801 # localhost or those going to example.com.
2803 acl broken_sites ssl::server_name .example.com
2804 ssl_bump splice localhost
2805 ssl_bump splice broken_sites
2809 NAME: sslproxy_cert_error
2812 DEFAULT_DOC: Server certificate errors terminate the transaction.
2813 LOC: Config.ssl_client.cert_error
2816 Use this ACL to bypass server certificate validation errors.
2818 For example, the following lines will bypass all validation errors
2819 when talking to servers for example.com. All other
2820 validation errors will result in ERR_SECURE_CONNECT_FAIL error.
2822 acl BrokenButTrustedServers dstdomain example.com
2823 sslproxy_cert_error allow BrokenButTrustedServers
2824 sslproxy_cert_error deny all
2826 This clause only supports fast acl types.
2827 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2828 Using slow acl types may result in server crashes
2830 Without this option, all server certificate validation errors
2831 terminate the transaction to protect Squid and the client.
2833 SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed
2834 but should not happen unless your OpenSSL library is buggy.
2837 Bypassing validation errors is dangerous because an
2838 error usually implies that the server cannot be trusted
2839 and the connection may be insecure.
2841 See also: sslproxy_flags and DONT_VERIFY_PEER.
2844 NAME: sslproxy_cert_sign
2847 POSTSCRIPTUM: signUntrusted ssl::certUntrusted
2848 POSTSCRIPTUM: signSelf ssl::certSelfSigned
2849 POSTSCRIPTUM: signTrusted all
2850 TYPE: sslproxy_cert_sign
2851 LOC: Config.ssl_client.cert_sign
2854 sslproxy_cert_sign <signing algorithm> acl ...
2856 The following certificate signing algorithms are supported:
2859 Sign using the configured CA certificate which is usually
2860 placed in and trusted by end-user browsers. This is the
2861 default for trusted origin server certificates.
2864 Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error.
2865 This is the default for untrusted origin server certificates
2866 that are not self-signed (see ssl::certUntrusted).
2869 Sign using a self-signed certificate with the right CN to
2870 generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the
2871 browser. This is the default for self-signed origin server
2872 certificates (see ssl::certSelfSigned).
2874 This clause only supports fast acl types.
2876 When sslproxy_cert_sign acl(s) match, Squid uses the corresponding
2877 signing algorithm to generate the certificate and ignores all
2878 subsequent sslproxy_cert_sign options (the first match wins). If no
2879 acl(s) match, the default signing algorithm is determined by errors
2880 detected when obtaining and validating the origin server certificate.
2882 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
2883 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
2884 CONNECT request that carries a domain name. In all other cases (CONNECT
2885 to an IP address or an intercepted SSL connection), Squid cannot detect
2886 the domain mismatch at certificate generation time when
2887 bump-server-first is used.
2890 NAME: sslproxy_cert_adapt
2893 TYPE: sslproxy_cert_adapt
2894 LOC: Config.ssl_client.cert_adapt
2897 sslproxy_cert_adapt <adaptation algorithm> acl ...
2899 The following certificate adaptation algorithms are supported:
2902 Sets the "Not After" property to the "Not After" property of
2903 the CA certificate used to sign generated certificates.
2906 Sets the "Not Before" property to the "Not Before" property of
2907 the CA certificate used to sign generated certificates.
2909 setCommonName or setCommonName{CN}
2910 Sets Subject.CN property to the host name specified as a
2911 CN parameter or, if no explicit CN parameter was specified,
2912 extracted from the CONNECT request. It is a misconfiguration
2913 to use setCommonName without an explicit parameter for
2914 intercepted or tproxied SSL connections.
2916 This clause only supports fast acl types.
2918 Squid first groups sslproxy_cert_adapt options by adaptation algorithm.
2919 Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the
2920 corresponding adaptation algorithm to generate the certificate and
2921 ignores all subsequent sslproxy_cert_adapt options in that algorithm's
2922 group (i.e., the first match wins within each algorithm group). If no
2923 acl(s) match, the default mimicking action takes place.
2925 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
2926 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
2927 CONNECT request that carries a domain name. In all other cases (CONNECT
2928 to an IP address or an intercepted SSL connection), Squid cannot detect
2929 the domain mismatch at certificate generation time when
2930 bump-server-first is used.
2933 NAME: sslpassword_program
2936 LOC: Config.Program.ssl_password
2939 Specify a program used for entering SSL key passphrases
2940 when using encrypted SSL certificate keys. If not specified
2941 keys must either be unencrypted, or Squid started with the -N
2942 option to allow it to query interactively for the passphrase.
2944 The key file name is given as argument to the program allowing
2945 selection of the right password if you have multiple encrypted
2950 OPTIONS RELATING TO EXTERNAL SSL_CRTD
2951 -----------------------------------------------------------------------------
2954 NAME: sslcrtd_program
2957 DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB
2958 LOC: Ssl::TheConfig.ssl_crtd
2960 Specify the location and options of the executable for certificate
2962 @DEFAULT_SSL_CRTD@ program requires -s and -M parameters
2963 For more information use:
2964 @DEFAULT_SSL_CRTD@ -h
2967 NAME: sslcrtd_children
2968 TYPE: HelperChildConfig
2970 DEFAULT: 32 startup=5 idle=1
2971 LOC: Ssl::TheConfig.ssl_crtdChildren
2973 The maximum number of processes spawn to service ssl server.
2974 The maximum this may be safely set to is 32.
2976 The startup= and idle= options allow some measure of skew in your
2981 Sets the minimum number of processes to spawn when Squid
2982 starts or reconfigures. When set to zero the first request will
2983 cause spawning of the first child process to handle it.
2985 Starting too few children temporary slows Squid under load while it
2986 tries to spawn enough additional processes to cope with traffic.
2990 Sets a minimum of how many processes Squid is to try and keep available
2991 at all times. When traffic begins to rise above what the existing
2992 processes can handle this many more will be spawned up to the maximum
2993 configured. A minimum setting of 1 is required.
2997 Sets the maximum number of queued requests.
2998 If the queued requests exceed queue size for more than 3 minutes
2999 squid aborts its operation.
3000 The default value is set to 2*numberofchildren.
3002 You must have at least one ssl_crtd process.
3005 NAME: sslcrtvalidator_program
3009 LOC: Ssl::TheConfig.ssl_crt_validator
3011 Specify the location and options of the executable for ssl_crt_validator
3014 Usage: sslcrtvalidator_program [ttl=n] [cache=n] path ...
3017 ttl=n TTL in seconds for cached results. The default is 60 secs
3018 cache=n limit the result cache size. The default value is 2048
3021 NAME: sslcrtvalidator_children
3022 TYPE: HelperChildConfig
3024 DEFAULT: 32 startup=5 idle=1 concurrency=1
3025 LOC: Ssl::TheConfig.ssl_crt_validator_Children
3027 The maximum number of processes spawn to service SSL server.
3028 The maximum this may be safely set to is 32.
3030 The startup= and idle= options allow some measure of skew in your
3035 Sets the minimum number of processes to spawn when Squid
3036 starts or reconfigures. When set to zero the first request will
3037 cause spawning of the first child process to handle it.
3039 Starting too few children temporary slows Squid under load while it
3040 tries to spawn enough additional processes to cope with traffic.
3044 Sets a minimum of how many processes Squid is to try and keep available
3045 at all times. When traffic begins to rise above what the existing
3046 processes can handle this many more will be spawned up to the maximum
3047 configured. A minimum setting of 1 is required.
3051 The number of requests each certificate validator helper can handle in
3052 parallel. A value of 0 indicates the certficate validator does not
3053 support concurrency. Defaults to 1.
3055 When this directive is set to a value >= 1 then the protocol
3056 used to communicate with the helper is modified to include
3057 a request ID in front of the request/response. The request
3058 ID from the request must be echoed back with the response
3063 Sets the maximum number of queued requests.
3064 If the queued requests exceed queue size for more than 3 minutes
3065 squid aborts its operation.
3066 The default value is set to 2*numberofchildren.
3068 You must have at least one ssl_crt_validator process.
3072 OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
3073 -----------------------------------------------------------------------------
3081 To specify other caches in a hierarchy, use the format:
3083 cache_peer hostname type http-port icp-port [options]
3088 # hostname type port port options
3089 # -------------------- -------- ----- ----- -----------
3090 cache_peer parent.foo.net parent 3128 3130 default
3091 cache_peer sib1.foo.net sibling 3128 3130 proxy-only
3092 cache_peer sib2.foo.net sibling 3128 3130 proxy-only
3093 cache_peer example.com parent 80 0 default
3094 cache_peer cdn.example.com sibling 3128 0
3096 type: either 'parent', 'sibling', or 'multicast'.
3098 proxy-port: The port number where the peer accept HTTP requests.
3099 For other Squid proxies this is usually 3128
3100 For web servers this is usually 80
3102 icp-port: Used for querying neighbor caches about objects.
3103 Set to 0 if the peer does not support ICP or HTCP.
3104 See ICP and HTCP options below for additional details.
3107 ==== ICP OPTIONS ====
3109 You MUST also set icp_port and icp_access explicitly when using these options.
3110 The defaults will prevent peer traffic using ICP.
3113 no-query Disable ICP queries to this neighbor.
3116 Indicates the named peer is a member of a multicast group.
3117 ICP queries will not be sent directly to the peer, but ICP
3118 replies will be accepted from it.
3120 closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
3121 CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
3124 To only send ICP queries to this neighbor infrequently.
3125 This is used to keep the neighbor round trip time updated
3126 and is usually used in conjunction with weighted-round-robin.
3129 ==== HTCP OPTIONS ====
3131 You MUST also set htcp_port and htcp_access explicitly when using these options.
3132 The defaults will prevent peer traffic using HTCP.
3135 htcp Send HTCP, instead of ICP, queries to the neighbor.
3136 You probably also want to set the "icp-port" to 4827
3137 instead of 3130. This directive accepts a comma separated
3138 list of options described below.
3140 htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier).
3142 htcp=no-clr Send HTCP to the neighbor but without
3143 sending any CLR requests. This cannot be used with
3146 htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests.
3147 This cannot be used with no-clr.
3150 Send HTCP to the neighbor including CLRs but only when
3151 they do not result from PURGE requests.
3154 Forward any HTCP CLR requests this proxy receives to the peer.
3157 ==== PEER SELECTION METHODS ====
3159 The default peer selection method is ICP, with the first responding peer
3160 being used as source. These options can be used for better load balancing.
3163 default This is a parent cache which can be used as a "last-resort"
3164 if a peer cannot be located by any of the peer-selection methods.
3165 If specified more than once, only the first is used.
3167 round-robin Load-Balance parents which should be used in a round-robin
3168 fashion in the absence of any ICP queries.
3169 weight=N can be used to add bias.
3171 weighted-round-robin
3172 Load-Balance parents which should be used in a round-robin
3173 fashion with the frequency of each parent being based on the
3174 round trip time. Closer parents are used more often.
3175 Usually used for background-ping parents.
3176 weight=N can be used to add bias.
3178 carp Load-Balance parents which should be used as a CARP array.
3179 The requests will be distributed among the parents based on the
3180 CARP load balancing hash function based on their weight.
3182 userhash Load-balance parents based on the client proxy_auth or ident username.
3184 sourcehash Load-balance parents based on the client source IP.
3187 To be used only for cache peers of type "multicast".
3188 ALL members of this multicast group have "sibling"
3189 relationship with it, not "parent". This is to a multicast
3190 group when the requested object would be fetched only from
3191 a "parent" cache, anyway. It's useful, e.g., when
3192 configuring a pool of redundant Squid proxies, being
3193 members of the same multicast group.
3196 ==== PEER SELECTION OPTIONS ====
3198 weight=N use to affect the selection of a peer during any weighted
3199 peer-selection mechanisms.
3200 The weight must be an integer; default is 1,
3201 larger weights are favored more.
3202 This option does not affect parent selection if a peering
3203 protocol is not in use.
3205 basetime=N Specify a base amount to be subtracted from round trip
3207 It is subtracted before division by weight in calculating
3208 which parent to fectch from. If the rtt is less than the
3209 base time the rtt is set to a minimal value.
3211 ttl=N Specify a TTL to use when sending multicast ICP queries
3213 Only useful when sending to a multicast group.
3214 Because we don't accept ICP replies from random
3215 hosts, you must configure other group members as
3216 peers with the 'multicast-responder' option.
3218 no-delay To prevent access to this neighbor from influencing the
3221 digest-url=URL Tell Squid to fetch the cache digest (if digests are
3222 enabled) for this host from the specified URL rather
3223 than the Squid default location.
3226 ==== CARP OPTIONS ====
3228 carp-key=key-specification
3229 use a different key than the full URL to hash against the peer.
3230 the key-specification is a comma-separated list of the keywords
3231 scheme, host, port, path, params
3232 Order is not important.
3234 ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
3236 originserver Causes this parent to be contacted as an origin server.
3237 Meant to be used in accelerator setups when the peer
3241 Set the Host header of requests forwarded to this peer.
3242 Useful in accelerator setups where the server (peer)
3243 expects a certain domain name but clients may request
3244 others. ie example.com or www.example.com
3246 no-digest Disable request of cache digests.
3249 Disables requesting ICMP RTT database (NetDB).
3252 ==== AUTHENTICATION OPTIONS ====
3255 If this is a personal/workgroup proxy and your parent
3256 requires proxy authentication.
3258 Note: The string can include URL escapes (i.e. %20 for
3259 spaces). This also means % must be written as %%.
3262 Send login details received from client to this peer.
3263 Both Proxy- and WWW-Authorization headers are passed
3264 without alteration to the peer.
3265 Authentication is not required by Squid for this to work.
3267 Note: This will pass any form of authentication but
3268 only Basic auth will work through a proxy unless the
3269 connection-auth options are also used.
3271 login=PASS Send login details received from client to this peer.
3272 Authentication is not required by this option.
3274 If there are no client-provided authentication headers
3275 to pass on, but username and password are available
3276 from an external ACL user= and password= result tags
3277 they may be sent instead.
3279 Note: To combine this with proxy_auth both proxies must
3280 share the same user database as HTTP only allows for
3281 a single login (one for proxy, one for origin server).
3282 Also be warned this will expose your users proxy
3283 password to the peer. USE WITH CAUTION
3286 Send the username to the upstream cache, but with a
3287 fixed password. This is meant to be used when the peer
3288 is in another administrative domain, but it is still
3289 needed to identify each user.
3290 The star can optionally be followed by some extra
3291 information which is added to the username. This can
3292 be used to identify this proxy to the peer, similar to
3293 the login=username:password option above.
3296 If this is a personal/workgroup proxy and your parent
3297 requires a secure proxy authentication.
3298 The first principal from the default keytab or defined by
3299 the environment variable KRB5_KTNAME will be used.
3301 WARNING: The connection may transmit requests from multiple
3302 clients. Negotiate often assumes end-to-end authentication
3303 and a single-client. Which is not strictly true here.
3305 login=NEGOTIATE:principal_name
3306 If this is a personal/workgroup proxy and your parent
3307 requires a secure proxy authentication.
3308 The principal principal_name from the default keytab or
3309 defined by the environment variable KRB5_KTNAME will be
3312 WARNING: The connection may transmit requests from multiple
3313 clients. Negotiate often assumes end-to-end authentication
3314 and a single-client. Which is not strictly true here.
3316 connection-auth=on|off
3317 Tell Squid that this peer does or not support Microsoft
3318 connection oriented authentication, and any such
3319 challenges received from there should be ignored.
3320 Default is auto to automatically determine the status
3324 Do not use a keytab to authenticate to a peer when
3325 login=NEGOTIATE is specified. Let the GSSAPI
3326 implementation determine which already existing
3327 credentials cache to use instead.
3330 ==== SSL / HTTPS / TLS OPTIONS ====
3332 tls Encrypt connections to this peer with TLS.
3334 sslcert=/path/to/ssl/certificate
3335 A client SSL certificate to use when connecting to
3338 sslkey=/path/to/ssl/key
3339 The private SSL key corresponding to sslcert above.
3340 If 'sslkey' is not specified 'sslcert' is assumed to
3341 reference a combined file containing both the
3342 certificate and the key.
3344 sslcipher=... The list of valid SSL ciphers to use when connecting
3348 The minimum TLS protocol version to permit. To control
3349 SSLv3 use the ssloptions= parameter.
3350 Supported Values: 1.0 (default), 1.1, 1.2
3352 ssloptions=... Specify various SSL implementation options:
3354 NO_SSLv3 Disallow the use of SSLv3
3356 NO_TLSv1 Disallow the use of TLSv1.0
3358 NO_TLSv1_1 Disallow the use of TLSv1.1
3360 NO_TLSv1_2 Disallow the use of TLSv1.2
3363 Always create a new key when using
3364 temporary/ephemeral DH key exchanges
3367 Disable use of RFC5077 session tickets.
3368 Some servers may have problems
3369 understanding the TLS extension due
3370 to ambiguous specification in RFC4507.
3372 ALL Enable various bug workarounds
3373 suggested as "harmless" by OpenSSL
3374 Be warned that this reduces SSL/TLS
3375 strength to some attacks.
3377 See the OpenSSL SSL_CTX_set_options documentation for a
3380 tls-cafile= PEM file containing CA certificates to use when verifying
3381 the peer certificate. May be repeated to load multiple files.
3383 sslcapath=... A directory containing additional CA certificates to
3384 use when verifying the peer certificate.
3385 Requires OpenSSL or LibreSSL.
3387 sslcrlfile=... A certificate revocation list file to use when
3388 verifying the peer certificate.
3390 sslflags=... Specify various flags modifying the SSL implementation:
3393 Accept certificates even if they fail to
3397 Don't verify the peer certificate
3398 matches the server name
3400 ssldomain= The peer name as advertised in it's certificate.
3401 Used for verifying the correctness of the received peer
3402 certificate. If not specified the peer hostname will be
3406 Enable the "Front-End-Https: On" header needed when
3407 using Squid as a SSL frontend in front of Microsoft OWA.
3408 See MS KB document Q307347 for details on this header.
3409 If set to auto the header will only be added if the
3410 request is forwarded as a https:// URL.
3412 tls-default-ca[=off]
3413 Whether to use the system Trusted CAs. Default is ON.
3415 tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1.
3417 ==== GENERAL OPTIONS ====
3420 A peer-specific connect timeout.
3421 Also see the peer_connect_timeout directive.
3423 connect-fail-limit=N
3424 How many times connecting to a peer must fail before
3425 it is marked as down. Standby connection failures
3426 count towards this limit. Default is 10.
3428 allow-miss Disable Squid's use of only-if-cached when forwarding
3429 requests to siblings. This is primarily useful when
3430 icp_hit_stale is used by the sibling. Excessive use
3431 of this option may result in forwarding loops. One way
3432 to prevent peering loops when using this option, is to
3433 deny cache peer usage on requests from a peer:
3435 cache_peer_access peerName deny fromPeer
3437 max-conn=N Limit the number of concurrent connections the Squid
3438 may open to this peer, including already opened idle
3439 and standby connections. There is no peer-specific
3440 connection limit by default.
3442 A peer exceeding the limit is not used for new
3443 requests unless a standby connection is available.
3445 max-conn currently works poorly with idle persistent
3446 connections: When a peer reaches its max-conn limit,
3447 and there are idle persistent connections to the peer,
3448 the peer may not be selected because the limiting code
3449 does not know whether Squid can reuse those idle
3452 standby=N Maintain a pool of N "hot standby" connections to an
3453 UP peer, available for requests when no idle
3454 persistent connection is available (or safe) to use.
3455 By default and with zero N, no such pool is maintained.
3456 N must not exceed the max-conn limit (if any).
3458 At start or after reconfiguration, Squid opens new TCP
3459 standby connections until there are N connections
3460 available and then replenishes the standby pool as
3461 opened connections are used up for requests. A used
3462 connection never goes back to the standby pool, but
3463 may go to the regular idle persistent connection pool
3464 shared by all peers and origin servers.
3466 Squid never opens multiple new standby connections
3467 concurrently. This one-at-a-time approach minimizes
3468 flooding-like effect on peers. Furthermore, just a few
3469 standby connections should be sufficient in most cases
3470 to supply most new requests with a ready-to-use
3473 Standby connections obey server_idle_pconn_timeout.
3474 For the feature to work as intended, the peer must be
3475 configured to accept and keep them open longer than
3476 the idle timeout at the connecting Squid, to minimize
3477 race conditions typical to idle used persistent
3478 connections. Default request_timeout and
3479 server_idle_pconn_timeout values ensure such a
3482 name=xxx Unique name for the peer.
3483 Required if you have multiple peers on the same host
3484 but different ports.
3485 This name can be used in cache_peer_access and similar
3486 directives to identify the peer.
3487 Can be used by outgoing access controls through the
3490 no-tproxy Do not use the client-spoof TPROXY support when forwarding
3491 requests to this peer. Use normal address selection instead.
3492 This overrides the spoof_client_ip ACL.
3494 proxy-only objects fetched from the peer will not be stored locally.
3498 NAME: cache_peer_access
3501 DEFAULT_DOC: No peer usage restrictions.
3504 Restricts usage of cache_peer proxies.
3507 cache_peer_access peer-name allow|deny [!]aclname ...
3509 For the required peer-name parameter, use either the value of the
3510 cache_peer name=value parameter or, if name=value is missing, the
3511 cache_peer hostname parameter.
3513 This directive narrows down the selection of peering candidates, but
3514 does not determine the order in which the selected candidates are
3515 contacted. That order is determined by the peer selection algorithms
3516 (see PEER SELECTION sections in the cache_peer documentation).
3518 If a deny rule matches, the corresponding peer will not be contacted
3519 for the current transaction -- Squid will not send ICP queries and
3520 will not forward HTTP requests to that peer. An allow match leaves
3521 the corresponding peer in the selection. The first match for a given
3522 peer wins for that peer.
3524 The relative order of cache_peer_access directives for the same peer
3525 matters. The relative order of any two cache_peer_access directives
3526 for different peers does not matter. To ease interpretation, it is a
3527 good idea to group cache_peer_access directives for the same peer
3530 A single cache_peer_access directive may be evaluated multiple times
3531 for a given transaction because individual peer selection algorithms
3532 may check it independently from each other. These redundant checks
3533 may be optimized away in future Squid versions.
3535 This clause only supports fast acl types.
3536 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3540 NAME: neighbor_type_domain
3541 TYPE: hostdomaintype
3543 DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer.
3546 Modify the cache_peer neighbor type when passing requests
3547 about specific domains to the peer.
3550 neighbor_type_domain neighbor parent|sibling domain domain ...
3553 cache_peer foo.example.com parent 3128 3130
3554 neighbor_type_domain foo.example.com sibling .au .de
3556 The above configuration treats all requests to foo.example.com as a
3557 parent proxy unless the request is for a .au or .de ccTLD domain name.
3560 NAME: dead_peer_timeout
3564 LOC: Config.Timeout.deadPeer
3566 This controls how long Squid waits to declare a peer cache
3567 as "dead." If there are no ICP replies received in this
3568 amount of time, Squid will declare the peer dead and not
3569 expect to receive any further ICP replies. However, it
3570 continues to send ICP queries, and will mark the peer as
3571 alive upon receipt of the first subsequent ICP reply.
3573 This timeout also affects when Squid expects to receive ICP
3574 replies from peers. If more than 'dead_peer' seconds have
3575 passed since the last ICP reply was received, Squid will not
3576 expect to receive an ICP reply on the next query. Thus, if
3577 your time between requests is greater than this timeout, you
3578 will see a lot of requests sent DIRECT to origin servers
3579 instead of to your parents.
3582 NAME: forward_max_tries
3585 LOC: Config.forward_max_tries
3587 Controls how many different forward paths Squid will try
3588 before giving up. See also forward_timeout.
3590 NOTE: connect_retries (default: none) can make each of these
3591 possible forwarding paths be tried multiple times.
3595 MEMORY CACHE OPTIONS
3596 -----------------------------------------------------------------------------
3603 LOC: Config.memMaxSize
3605 NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
3606 IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
3607 USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
3608 THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
3610 'cache_mem' specifies the ideal amount of memory to be used
3612 * In-Transit objects
3614 * Negative-Cached objects
3616 Data for these objects are stored in 4 KB blocks. This
3617 parameter specifies the ideal upper limit on the total size of
3618 4 KB blocks allocated. In-Transit objects take the highest
3621 In-transit objects have priority over the others. When
3622 additional space is needed for incoming data, negative-cached
3623 and hot objects will be released. In other words, the
3624 negative-cached and hot objects will fill up any unused space
3625 not needed for in-transit objects.
3627 If circumstances require, this limit will be exceeded.
3628 Specifically, if your incoming request rate requires more than
3629 'cache_mem' of memory to hold in-transit objects, Squid will
3630 exceed this limit to satisfy the new requests. When the load
3631 decreases, blocks will be freed until the high-water mark is
3632 reached. Thereafter, blocks will be used to store hot
3635 If shared memory caching is enabled, Squid does not use the shared
3636 cache space for in-transit objects, but they still consume as much
3637 local memory as they need. For more details about the shared memory
3638 cache, see memory_cache_shared.
3641 NAME: maximum_object_size_in_memory
3645 LOC: Config.Store.maxInMemObjSize
3647 Objects greater than this size will not be attempted to kept in
3648 the memory cache. This should be set high enough to keep objects
3649 accessed frequently in memory to improve performance whilst low
3650 enough to keep larger objects from hoarding cache_mem.
3653 NAME: memory_cache_shared
3656 LOC: Config.memShared
3658 DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers.
3660 Controls whether the memory cache is shared among SMP workers.
3662 The shared memory cache is meant to occupy cache_mem bytes and replace
3663 the non-shared memory cache, although some entities may still be
3664 cached locally by workers for now (e.g., internal and in-transit
3665 objects may be served from a local memory cache even if shared memory
3666 caching is enabled).
3668 By default, the memory cache is shared if and only if all of the
3669 following conditions are satisfied: Squid runs in SMP mode with
3670 multiple workers, cache_mem is positive, and Squid environment
3671 supports required IPC primitives (e.g., POSIX shared memory segments
3672 and GCC-style atomic operations).
3674 To avoid blocking locks, shared memory uses opportunistic algorithms
3675 that do not guarantee that every cachable entity that could have been
3676 shared among SMP workers will actually be shared.
3679 NAME: memory_cache_mode
3683 DEFAULT_DOC: Keep the most recently fetched objects in memory
3685 Controls which objects to keep in the memory cache (cache_mem)
3687 always Keep most recently fetched objects in memory (default)
3689 disk Only disk cache hits are kept in memory, which means
3690 an object must first be cached on disk and then hit
3691 a second time before cached in memory.
3693 network Only objects fetched from network is kept in memory
3696 NAME: memory_replacement_policy
3698 LOC: Config.memPolicy
3701 The memory replacement policy parameter determines which
3702 objects are purged from memory when memory space is needed.
3704 See cache_replacement_policy for details on algorithms.
3709 -----------------------------------------------------------------------------
3712 NAME: cache_replacement_policy
3714 LOC: Config.replPolicy
3717 The cache replacement policy parameter determines which
3718 objects are evicted (replaced) when disk space is needed.
3720 lru : Squid's original list based LRU policy
3721 heap GDSF : Greedy-Dual Size Frequency
3722 heap LFUDA: Least Frequently Used with Dynamic Aging
3723 heap LRU : LRU policy implemented using a heap
3725 Applies to any cache_dir lines listed below this directive.
3727 The LRU policies keeps recently referenced objects.
3729 The heap GDSF policy optimizes object hit rate by keeping smaller
3730 popular objects in cache so it has a better chance of getting a
3731 hit. It achieves a lower byte hit rate than LFUDA though since
3732 it evicts larger (possibly popular) objects.
3734 The heap LFUDA policy keeps popular objects in cache regardless of
3735 their size and thus optimizes byte hit rate at the expense of
3736 hit rate since one large, popular object will prevent many
3737 smaller, slightly less popular objects from being cached.
3739 Both policies utilize a dynamic aging mechanism that prevents
3740 cache pollution that can otherwise occur with frequency-based
3741 replacement policies.
3743 NOTE: if using the LFUDA replacement policy you should increase
3744 the value of maximum_object_size above its default of 4 MB to
3745 to maximize the potential byte hit rate improvement of LFUDA.
3747 For more information about the GDSF and LFUDA cache replacement
3748 policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
3749 and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
3752 NAME: minimum_object_size
3756 DEFAULT_DOC: no limit
3757 LOC: Config.Store.minObjectSize
3759 Objects smaller than this size will NOT be saved on disk. The
3760 value is specified in bytes, and the default is 0 KB, which
3761 means all responses can be stored.
3764 NAME: maximum_object_size
3768 LOC: Config.Store.maxObjectSize
3770 Set the default value for max-size parameter on any cache_dir.
3771 The value is specified in bytes, and the default is 4 MB.
3773 If you wish to get a high BYTES hit ratio, you should probably
3774 increase this (one 32 MB object hit counts for 3200 10KB
3777 If you wish to increase hit ratio more than you want to
3778 save bandwidth you should leave this low.
3780 NOTE: if using the LFUDA replacement policy you should increase
3781 this value to maximize the byte hit rate improvement of LFUDA!
3782 See cache_replacement_policy for a discussion of this policy.
3788 DEFAULT_DOC: No disk cache. Store cache ojects only in memory.
3789 LOC: Config.cacheSwap
3792 cache_dir Type Directory-Name Fs-specific-data [options]
3794 You can specify multiple cache_dir lines to spread the
3795 cache among different disk partitions.
3797 Type specifies the kind of storage system to use. Only "ufs"
3798 is built by default. To enable any of the other storage systems
3799 see the --enable-storeio configure option.
3801 'Directory' is a top-level directory where cache swap
3802 files will be stored. If you want to use an entire disk
3803 for caching, this can be the mount-point directory.
3804 The directory must exist and be writable by the Squid
3805 process. Squid will NOT create this directory for you.
3807 In SMP configurations, cache_dir must not precede the workers option
3808 and should use configuration macros or conditionals to give each
3809 worker interested in disk caching a dedicated cache directory.
3812 ==== The ufs store type ====
3814 "ufs" is the old well-known Squid storage format that has always
3818 cache_dir ufs Directory-Name Mbytes L1 L2 [options]
3820 'Mbytes' is the amount of disk space (MB) to use under this
3821 directory. The default is 100 MB. Change this to suit your
3822 configuration. Do NOT put the size of your disk drive here.
3823 Instead, if you want Squid to use the entire disk drive,
3824 subtract 20% and use that value.
3826 'L1' is the number of first-level subdirectories which
3827 will be created under the 'Directory'. The default is 16.
3829 'L2' is the number of second-level subdirectories which
3830 will be created under each first-level directory. The default
3834 ==== The aufs store type ====
3836 "aufs" uses the same storage format as "ufs", utilizing
3837 POSIX-threads to avoid blocking the main Squid process on
3838 disk-I/O. This was formerly known in Squid as async-io.
3841 cache_dir aufs Directory-Name Mbytes L1 L2 [options]
3843 see argument descriptions under ufs above
3846 ==== The diskd store type ====
3848 "diskd" uses the same storage format as "ufs", utilizing a
3849 separate process to avoid blocking the main Squid process on
3853 cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
3855 see argument descriptions under ufs above
3857 Q1 specifies the number of unacknowledged I/O requests when Squid
3858 stops opening new files. If this many messages are in the queues,
3859 Squid won't open new files. Default is 64
3861 Q2 specifies the number of unacknowledged messages when Squid
3862 starts blocking. If this many messages are in the queues,
3863 Squid blocks until it receives some replies. Default is 72
3865 When Q1 < Q2 (the default), the cache directory is optimized
3866 for lower response time at the expense of a decrease in hit
3867 ratio. If Q1 > Q2, the cache directory is optimized for
3868 higher hit ratio at the expense of an increase in response
3872 ==== The rock store type ====
3875 cache_dir rock Directory-Name Mbytes [options]
3877 The Rock Store type is a database-style storage. All cached
3878 entries are stored in a "database" file, using fixed-size slots.
3879 A single entry occupies one or more slots.
3881 If possible, Squid using Rock Store creates a dedicated kid
3882 process called "disker" to avoid blocking Squid worker(s) on disk
3883 I/O. One disker kid is created for each rock cache_dir. Diskers
3884 are created only when Squid, running in daemon mode, has support
3885 for the IpcIo disk I/O module.
3887 swap-timeout=msec: Squid will not start writing a miss to or
3888 reading a hit from disk if it estimates that the swap operation
3889 will take more than the specified number of milliseconds. By
3890 default and when set to zero, disables the disk I/O time limit
3891 enforcement. Ignored when using blocking I/O module because
3892 blocking synchronous I/O does not allow Squid to estimate the
3893 expected swap wait time.
3895 max-swap-rate=swaps/sec: Artificially limits disk access using
3896 the specified I/O rate limit. Swap out requests that
3897 would cause the average I/O rate to exceed the limit are
3898 delayed. Individual swap in requests (i.e., hits or reads) are
3899 not delayed, but they do contribute to measured swap rate and
3900 since they are placed in the same FIFO queue as swap out
3901 requests, they may wait longer if max-swap-rate is smaller.
3902 This is necessary on file systems that buffer "too
3903 many" writes and then start blocking Squid and other processes
3904 while committing those writes to disk. Usually used together
3905 with swap-timeout to avoid excessive delays and queue overflows
3906 when disk demand exceeds available disk "bandwidth". By default
3907 and when set to zero, disables the disk I/O rate limit
3908 enforcement. Currently supported by IpcIo module only.
3910 slot-size=bytes: The size of a database "record" used for
3911 storing cached responses. A cached response occupies at least
3912 one slot and all database I/O is done using individual slots so
3913 increasing this parameter leads to more disk space waste while
3914 decreasing it leads to more disk I/O overheads. Should be a
3915 multiple of your operating system I/O page size. Defaults to
3916 16KBytes. A housekeeping header is stored with each slot and
3917 smaller slot-sizes will be rejected. The header is smaller than
3921 ==== COMMON OPTIONS ====
3923 no-store no new objects should be stored to this cache_dir.
3925 min-size=n the minimum object size in bytes this cache_dir
3926 will accept. It's used to restrict a cache_dir
3927 to only store large objects (e.g. AUFS) while
3928 other stores are optimized for smaller objects
3932 max-size=n the maximum object size in bytes this cache_dir
3934 The value in maximum_object_size directive sets
3935 the default unless more specific details are
3936 available (ie a small store capacity).
3938 Note: To make optimal use of the max-size limits you should order
3939 the cache_dir lines with the smallest max-size value first.
3943 # Uncomment and adjust the following to add a disk cache directory.
3944 #cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256
3948 NAME: store_dir_select_algorithm
3950 LOC: Config.store_dir_select_algorithm
3953 How Squid selects which cache_dir to use when the response
3954 object will fit into more than one.
3956 Regardless of which algorithm is used the cache_dir min-size
3957 and max-size parameters are obeyed. As such they can affect
3958 the selection algorithm by limiting the set of considered
3965 This algorithm is suited to caches with similar cache_dir
3966 sizes and disk speeds.
3968 The disk with the least I/O pending is selected.
3969 When there are multiple disks with the same I/O load ranking
3970 the cache_dir with most available capacity is selected.
3972 When a mix of cache_dir sizes are configured the faster disks
3973 have a naturally lower I/O loading and larger disks have more
3974 capacity. So space used to store objects and data throughput
3975 may be very unbalanced towards larger disks.
3980 This algorithm is suited to caches with unequal cache_dir
3983 Each cache_dir is selected in a rotation. The next suitable
3986 Available cache_dir capacity is only considered in relation
3987 to whether the object will fit and meets the min-size and
3988 max-size parameters.
3990 Disk I/O loading is only considered to prevent overload on slow
3991 disks. This algorithm does not spread objects by size, so any
3992 I/O loading per-disk may appear very unbalanced and volatile.
3994 If several cache_dirs use similar min-size, max-size, or other
3995 limits to to reject certain responses, then do not group such
3996 cache_dir lines together, to avoid round-robin selection bias
3997 towards the first cache_dir after the group. Instead, interleave
3998 cache_dir lines from different groups. For example:
4000 store_dir_select_algorithm round-robin
4001 cache_dir rock /hdd1 ... min-size=100000
4002 cache_dir rock /ssd1 ... max-size=99999
4003 cache_dir rock /hdd2 ... min-size=100000
4004 cache_dir rock /ssd2 ... max-size=99999
4005 cache_dir rock /hdd3 ... min-size=100000
4006 cache_dir rock /ssd3 ... max-size=99999
4009 NAME: max_open_disk_fds
4011 LOC: Config.max_open_disk_fds
4013 DEFAULT_DOC: no limit
4015 To avoid having disk as the I/O bottleneck Squid can optionally
4016 bypass the on-disk cache if more than this amount of disk file
4017 descriptors are open.
4019 A value of 0 indicates no limit.
4022 NAME: cache_swap_low
4023 COMMENT: (percent, 0-100)
4026 LOC: Config.Swap.lowWaterMark
4028 The low-water mark for AUFS/UFS/diskd cache object eviction by
4029 the cache_replacement_policy algorithm.
4031 Removal begins when the swap (disk) usage of a cache_dir is
4032 above this low-water mark and attempts to maintain utilization
4033 near the low-water mark.
4035 As swap utilization increases towards the high-water mark set
4036 by cache_swap_high object eviction becomes more agressive.
4038 The value difference in percentages between low- and high-water
4039 marks represent an eviction rate of 300 objects per second and
4040 the rate continues to scale in agressiveness by multiples of
4041 this above the high-water mark.
4043 Defaults are 90% and 95%. If you have a large cache, 5% could be
4044 hundreds of MB. If this is the case you may wish to set these
4045 numbers closer together.
4047 See also cache_swap_high and cache_replacement_policy
4050 NAME: cache_swap_high
4051 COMMENT: (percent, 0-100)
4054 LOC: Config.Swap.highWaterMark
4056 The high-water mark for AUFS/UFS/diskd cache object eviction by
4057 the cache_replacement_policy algorithm.
4059 Removal begins when the swap (disk) usage of a cache_dir is
4060 above the low-water mark set by cache_swap_low and attempts to
4061 maintain utilization near the low-water mark.
4063 As swap utilization increases towards this high-water mark object
4064 eviction becomes more agressive.
4066 The value difference in percentages between low- and high-water
4067 marks represent an eviction rate of 300 objects per second and
4068 the rate continues to scale in agressiveness by multiples of
4069 this above the high-water mark.
4071 Defaults are 90% and 95%. If you have a large cache, 5% could be
4072 hundreds of MB. If this is the case you may wish to set these
4073 numbers closer together.
4075 See also cache_swap_low and cache_replacement_policy
4080 -----------------------------------------------------------------------------
4087 DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in.
4091 logformat <name> <format specification>
4093 Defines an access log format.
4095 The <format specification> is a string with embedded % format codes
4097 % format codes all follow the same basic structure where all but
4098 the formatcode is optional. Output strings are automatically escaped
4099 as required according to their context and the output format
4100 modifiers are usually not needed, but can be specified if an explicit
4101 output format is desired.
4103 % ["|[|'|#|/] [-] [[0]width] [{arg}] formatcode [{arg}]
4105 " output in quoted string format
4106 [ output in squid text log format as used by log_mime_hdrs
4107 # output in URL quoted format
4108 / output in shell \-escaped format
4113 width minimum and/or maximum field width:
4114 [width_min][.width_max]
4115 When minimum starts with 0, the field is zero-padded.
4116 String values exceeding maximum width are truncated.
4118 {arg} argument such as header name etc. This field may be
4119 placed before or after the token, but not both at once.
4123 % a literal % character
4124 sn Unique sequence number per log line entry
4125 err_code The ID of an error response served by Squid or
4126 a similar internal error identifier.
4127 err_detail Additional err_code-dependent error information.
4128 note The annotation specified by the argument. Also
4129 logs the adaptation meta headers set by the
4130 adaptation_meta configuration parameter.
4131 If no argument given all annotations logged.
4132 The argument may include a separator to use with
4135 By default, multiple note values are separated with ","
4136 and multiple notes are separated with "\r\n".
4137 When logging named notes with %{name}note, the
4138 explicitly configured separator is used between note
4139 values. When logging all notes with %note, the
4140 explicitly configured separator is used between
4141 individual notes. There is currently no way to
4142 specify both value and notes separators when logging
4143 all notes with %note.
4145 Connection related format codes:
4147 >a Client source IP address
4149 >p Client source port
4150 >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier)
4151 >la Local IP address the client connected to
4152 >lp Local port number the client connected to
4153 >qos Client connection TOS/DSCP value set by Squid
4154 >nfmark Client connection netfilter mark set by Squid
4156 la Local listening IP address the client connection was connected to.
4157 lp Local listening port number the client connection was connected to.
4159 <a Server IP address of the last server or peer connection
4160 <A Server FQDN or peer name
4161 <p Server port number of the last server or peer connection
4162 <la Local IP address of the last server or peer connection
4163 <lp Local port number of the last server or peer connection
4164 <qos Server connection TOS/DSCP value set by Squid
4165 <nfmark Server connection netfilter mark set by Squid
4167 Time related format codes:
4169 ts Seconds since epoch
4170 tu subsecond time (milliseconds)
4171 tl Local time. Optional strftime format argument
4172 default %d/%b/%Y:%H:%M:%S %z
4173 tg GMT time. Optional strftime format argument
4174 default %d/%b/%Y:%H:%M:%S %z
4175 tr Response time (milliseconds)
4176 dt Total time spent making DNS lookups (milliseconds)
4177 tS Approximate master transaction start time in
4178 <full seconds since epoch>.<fractional seconds> format.
4179 Currently, Squid considers the master transaction
4180 started when a complete HTTP request header initiating
4181 the transaction is received from the client. This is
4182 the same value that Squid uses to calculate transaction
4183 response time when logging %tr to access.log. Currently,
4184 Squid uses millisecond resolution for %tS values,
4185 similar to the default access.log "current time" field
4188 Access Control related format codes:
4190 et Tag returned by external acl
4191 ea Log string returned by external acl
4192 un User name (any available)
4193 ul User name from authentication
4194 ue User name from external acl helper
4195 ui User name from ident
4196 un A user name. Expands to the first available name
4197 from the following list of information sources:
4198 - authenticated user name, like %ul
4199 - user name supplied by an external ACL, like %ue
4200 - SSL client name, like %us
4201 - ident user name, like %ui
4202 credentials Client credentials. The exact meaning depends on
4203 the authentication scheme: For Basic authentication,
4204 it is the password; for Digest, the realm sent by the
4205 client; for NTLM and Negotiate, the client challenge
4206 or client credentials prefixed with "YR " or "KK ".
4208 HTTP related format codes:
4212 [http::]rm Request method (GET/POST etc)
4213 [http::]>rm Request method from client
4214 [http::]<rm Request method sent to server or peer
4215 [http::]ru Request URL from client (historic, filtered for logging)
4216 [http::]>ru Request URL from client
4217 [http::]<ru Request URL sent to server or peer
4218 [http::]>rs Request URL scheme from client
4219 [http::]<rs Request URL scheme sent to server or peer
4220 [http::]>rd Request URL domain from client
4221 [http::]<rd Request URL domain sent to server or peer
4222 [http::]>rP Request URL port from client
4223 [http::]<rP Request URL port sent to server or peer
4224 [http::]rp Request URL path excluding hostname
4225 [http::]>rp Request URL path excluding hostname from client
4226 [http::]<rp Request URL path excluding hostname sent to server or peer
4227 [http::]rv Request protocol version
4228 [http::]>rv Request protocol version from client
4229 [http::]<rv Request protocol version sent to server or peer
4231 [http::]>h Original received request header.
4232 Usually differs from the request header sent by
4233 Squid, although most fields are often preserved.
4234 Accepts optional header field name/value filter
4235 argument using name[:[separator]element] format.
4236 [http::]>ha Received request header after adaptation and
4237 redirection (pre-cache REQMOD vectoring point).
4238 Usually differs from the request header sent by
4239 Squid, although most fields are often preserved.
4240 Optional header name argument as for >h
4244 [http::]<Hs HTTP status code received from the next hop
4245 [http::]>Hs HTTP status code sent to the client
4247 [http::]<h Reply header. Optional header name argument
4250 [http::]mt MIME content type
4255 [http::]st Total size of request + reply traffic with client
4256 [http::]>st Total size of request received from client.
4257 Excluding chunked encoding bytes.
4258 [http::]<st Total size of reply sent to client (after adaptation)
4260 [http::]>sh Size of request headers received from client
4261 [http::]<sh Size of reply headers sent to client (after adaptation)
4263 [http::]<sH Reply high offset sent
4264 [http::]<sS Upstream object size
4266 [http::]<bs Number of HTTP-equivalent message body bytes
4267 received from the next hop, excluding chunked
4268 transfer encoding and control messages.
4269 Generated FTP/Gopher listings are treated as
4274 [http::]<pt Peer response time in milliseconds. The timer starts
4275 when the last request byte is sent to the next hop
4276 and stops when the last response byte is received.
4277 [http::]<tt Total time in milliseconds. The timer
4278 starts with the first connect request (or write I/O)
4279 sent to the first selected peer. The timer stops
4280 with the last I/O with the last peer.
4282 Squid handling related format codes:
4284 Ss Squid request status (TCP_MISS etc)
4285 Sh Squid hierarchy status (DEFAULT_PARENT etc)
4287 SSL-related format codes:
4289 ssl::bump_mode SslBump decision for the transaction:
4291 For CONNECT requests that initiated bumping of
4292 a connection and for any request received on
4293 an already bumped connection, Squid logs the
4294 corresponding SslBump mode ("server-first" or
4295 "client-first"). See the ssl_bump option for
4296 more information about these modes.
4298 A "none" token is logged for requests that
4299 triggered "ssl_bump" ACL evaluation matching
4300 either a "none" rule or no rules at all.
4302 In all other cases, a single dash ("-") is
4305 ssl::>sni SSL client SNI sent to Squid. Available only
4306 after the peek, stare, or splice SSL bumping
4310 The Subject field of the received client
4311 SSL certificate or a dash ('-') if Squid has
4312 received an invalid/malformed certificate or
4313 no certificate at all. Consider encoding the
4314 logged value because Subject often has spaces.
4317 The Issuer field of the received client
4318 SSL certificate or a dash ('-') if Squid has
4319 received an invalid/malformed certificate or
4320 no certificate at all. Consider encoding the
4321 logged value because Issuer often has spaces.
4324 The list of certificate validation errors
4325 detected by Squid (including OpenSSL and
4326 certificate validation helper components). The
4327 errors are listed in the discovery order. By
4328 default, the error codes are separated by ':'.
4329 Accepts an optional separator argument.
4331 %ssl::>negotiated_version The negotiated TLS version of the
4334 %ssl::<negotiated_version The negotiated TLS version of the
4335 last server or peer connection.
4337 %ssl::>received_hello_version The TLS version of the Hello
4338 message received from TLS client.
4340 %ssl::<received_hello_version The TLS version of the Hello
4341 message received from TLS server.
4343 %ssl::>received_supported_version The maximum TLS version
4344 supported by the TLS client.
4346 %ssl::<received_supported_version The maximum TLS version
4347 supported by the TLS server.
4349 %ssl::>negotiated_cipher The negotiated cipher of the
4352 %ssl::<negotiated_cipher The negotiated cipher of the
4353 last server or peer connection.
4355 If ICAP is enabled, the following code becomes available (as
4356 well as ICAP log codes documented with the icap_log option):
4358 icap::tt Total ICAP processing time for the HTTP
4359 transaction. The timer ticks when ICAP
4360 ACLs are checked and when ICAP
4361 transaction is in progress.
4363 If adaptation is enabled the following codes become available:
4365 adapt::<last_h The header of the last ICAP response or
4366 meta-information from the last eCAP
4367 transaction related to the HTTP transaction.
4368 Like <h, accepts an optional header name
4371 adapt::sum_trs Summed adaptation transaction response
4372 times recorded as a comma-separated list in
4373 the order of transaction start time. Each time
4374 value is recorded as an integer number,
4375 representing response time of one or more
4376 adaptation (ICAP or eCAP) transaction in
4377 milliseconds. When a failed transaction is
4378 being retried or repeated, its time is not
4379 logged individually but added to the
4380 replacement (next) transaction. See also:
4383 adapt::all_trs All adaptation transaction response times.
4384 Same as adaptation_strs but response times of
4385 individual transactions are never added
4386 together. Instead, all transaction response
4387 times are recorded individually.
4389 You can prefix adapt::*_trs format codes with adaptation
4390 service name in curly braces to record response time(s) specific
4391 to that service. For example: %{my_service}adapt::sum_trs
4393 The default formats available (which do not need re-defining) are:
4395 logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
4396 logformat common %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
4397 logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
4398 logformat referrer %ts.%03tu %>a %{Referer}>h %ru
4399 logformat useragent %>a [%tl] "%{User-Agent}>h"
4401 NOTE: When the log_mime_hdrs directive is set to ON.
4402 The squid, common and combined formats have a safely encoded copy
4403 of the mime headers appended to each line within a pair of brackets.
4405 NOTE: The common and combined formats are not quite true to the Apache definition.
4406 The logs from Squid contain an extra status and hierarchy code appended.
4410 NAME: access_log cache_access_log
4412 LOC: Config.Log.accesslogs
4413 DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid
4415 Configures whether and how Squid logs HTTP and ICP transactions.
4416 If access logging is enabled, a single line is logged for every
4417 matching HTTP or ICP request. The recommended directive formats are:
4419 access_log <module>:<place> [option ...] [acl acl ...]
4420 access_log none [acl acl ...]
4422 The following directive format is accepted but may be deprecated:
4423 access_log <module>:<place> [<logformat name> [acl acl ...]]
4425 In most cases, the first ACL name must not contain the '=' character
4426 and should not be equal to an existing logformat name. You can always
4427 start with an 'all' ACL to work around those restrictions.
4429 Will log to the specified module:place using the specified format (which
4430 must be defined in a logformat directive) those entries which match
4431 ALL the acl's specified (which must be defined in acl clauses).
4432 If no acl is specified, all requests will be logged to this destination.
4434 ===== Available options for the recommended directive format =====
4436 logformat=name Names log line format (either built-in or
4437 defined by a logformat directive). Defaults
4440 buffer-size=64KB Defines approximate buffering limit for log
4441 records (see buffered_logs). Squid should not
4442 keep more than the specified size and, hence,
4443 should flush records before the buffer becomes
4444 full to avoid overflows under normal
4445 conditions (the exact flushing algorithm is
4446 module-dependent though). The on-error option
4447 controls overflow handling.
4449 on-error=die|drop Defines action on unrecoverable errors. The
4450 'drop' action ignores (i.e., does not log)
4451 affected log records. The default 'die' action
4452 kills the affected worker. The drop action
4453 support has not been tested for modules other
4456 rotate=N Specifies the number of log file rotations to
4457 make when you run 'squid -k rotate'. The default
4458 is to obey the logfile_rotate directive. Setting
4459 rotate=0 will disable the file name rotation,
4460 but the log files are still closed and re-opened.
4461 This will enable you to rename the logfiles
4462 yourself just before sending the rotate signal.
4463 Only supported by the stdio module.
4465 ===== Modules Currently available =====
4467 none Do not log any requests matching these ACL.
4468 Do not specify Place or logformat name.
4470 stdio Write each log line to disk immediately at the completion of
4472 Place: the filename and path to be written.
4474 daemon Very similar to stdio. But instead of writing to disk the log
4475 line is passed to a daemon helper for asychronous handling instead.
4476 Place: varies depending on the daemon.
4478 log_file_daemon Place: the file name and path to be written.
4480 syslog To log each request via syslog facility.
4481 Place: The syslog facility and priority level for these entries.
4482 Place Format: facility.priority
4484 where facility could be any of:
4485 authpriv, daemon, local0 ... local7 or user.
4487 And priority could be any of:
4488 err, warning, notice, info, debug.
4490 udp To send each log line as text data to a UDP receiver.
4491 Place: The destination host name or IP and port.
4492 Place Format: //host:port
4494 tcp To send each log line as text data to a TCP receiver.
4495 Lines may be accumulated before sending (see buffered_logs).
4496 Place: The destination host name or IP and port.
4497 Place Format: //host:port
4500 access_log daemon:@DEFAULT_ACCESS_LOG@ squid
4506 LOC: Config.Log.icaplogs
4509 ICAP log files record ICAP transaction summaries, one line per
4512 The icap_log option format is:
4513 icap_log <filepath> [<logformat name> [acl acl ...]]
4514 icap_log none [acl acl ...]]
4516 Please see access_log option documentation for details. The two
4517 kinds of logs share the overall configuration approach and many
4520 ICAP processing of a single HTTP message or transaction may
4521 require multiple ICAP transactions. In such cases, multiple
4522 ICAP transaction log lines will correspond to a single access
4525 ICAP log supports many access.log logformat %codes. In ICAP context,
4526 HTTP message-related %codes are applied to the HTTP message embedded
4527 in an ICAP message. Logformat "%http::>..." codes are used for HTTP
4528 messages embedded in ICAP requests while "%http::<..." codes are used
4529 for HTTP messages embedded in ICAP responses. For example:
4531 http::>h To-be-adapted HTTP message headers sent by Squid to
4532 the ICAP service. For REQMOD transactions, these are
4533 HTTP request headers. For RESPMOD, these are HTTP
4534 response headers, but Squid currently cannot log them
4535 (i.e., %http::>h will expand to "-" for RESPMOD).
4537 http::<h Adapted HTTP message headers sent by the ICAP
4538 service to Squid (i.e., HTTP request headers in regular
4539 REQMOD; HTTP response headers in RESPMOD and during
4540 request satisfaction in REQMOD).
4542 ICAP OPTIONS transactions do not embed HTTP messages.
4544 Several logformat codes below deal with ICAP message bodies. An ICAP
4545 message body, if any, typically includes a complete HTTP message
4546 (required HTTP headers plus optional HTTP message body). When
4547 computing HTTP message body size for these logformat codes, Squid
4548 either includes or excludes chunked encoding overheads; see
4549 code-specific documentation for details.
4551 For Secure ICAP services, all size-related information is currently
4552 computed before/after TLS encryption/decryption, as if TLS was not
4555 The following format codes are also available for ICAP logs:
4557 icap::<A ICAP server IP address. Similar to <A.
4559 icap::<service_name ICAP service name from the icap_service
4560 option in Squid configuration file.
4562 icap::ru ICAP Request-URI. Similar to ru.
4564 icap::rm ICAP request method (REQMOD, RESPMOD, or
4565 OPTIONS). Similar to existing rm.
4567 icap::>st The total size of the ICAP request sent to the ICAP
4568 server (ICAP headers + ICAP body), including chunking
4571 icap::<st The total size of the ICAP response received from the
4572 ICAP server (ICAP headers + ICAP body), including
4573 chunking metadata (if any).
4575 icap::<bs The size of the ICAP response body received from the
4576 ICAP server, excluding chunking metadata (if any).
4578 icap::tr Transaction response time (in
4579 milliseconds). The timer starts when
4580 the ICAP transaction is created and
4581 stops when the transaction is completed.
4584 icap::tio Transaction I/O time (in milliseconds). The
4585 timer starts when the first ICAP request
4586 byte is scheduled for sending. The timers
4587 stops when the last byte of the ICAP response
4590 icap::to Transaction outcome: ICAP_ERR* for all
4591 transaction errors, ICAP_OPT for OPTION
4592 transactions, ICAP_ECHO for 204
4593 responses, ICAP_MOD for message
4594 modification, and ICAP_SAT for request
4595 satisfaction. Similar to Ss.
4597 icap::Hs ICAP response status code. Similar to Hs.
4599 icap::>h ICAP request header(s). Similar to >h.
4601 icap::<h ICAP response header(s). Similar to <h.
4603 The default ICAP log format, which can be used without an explicit
4604 definition, is called icap_squid:
4606 logformat icap_squid %ts.%03tu %6icap::tr %>A %icap::to/%03icap::Hs %icap::<st %icap::rm %icap::ru %un -/%icap::<A -
4608 See also: logformat and %adapt::<last_h
4611 NAME: logfile_daemon
4613 DEFAULT: @DEFAULT_LOGFILED@
4614 LOC: Log::TheConfig.logfile_daemon
4616 Specify the path to the logfile-writing daemon. This daemon is
4617 used to write the access and store logs, if configured.
4619 Squid sends a number of commands to the log daemon:
4620 L<data>\n - logfile data
4625 r<n>\n - set rotate count to <n>
4626 b<n>\n - 1 = buffer output, 0 = don't buffer output
4628 No responses is expected.
4631 NAME: stats_collection
4633 LOC: Config.accessList.stats_collection
4635 DEFAULT_DOC: Allow logging for all transactions.
4636 COMMENT: allow|deny acl acl...
4638 This options allows you to control which requests gets accounted
4639 in performance counters.
4641 This clause only supports fast acl types.
4642 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4645 NAME: cache_store_log
4648 LOC: Config.Log.store
4650 Logs the activities of the storage manager. Shows which
4651 objects are ejected from the cache, and which objects are
4652 saved and for how long.
4653 There are not really utilities to analyze this data, so you can safely
4654 disable it (the default).
4656 Store log uses modular logging outputs. See access_log for the list
4657 of modules supported.
4660 cache_store_log stdio:@DEFAULT_STORE_LOG@
4661 cache_store_log daemon:@DEFAULT_STORE_LOG@
4664 NAME: cache_swap_state cache_swap_log
4666 LOC: Config.Log.swap
4668 DEFAULT_DOC: Store the journal inside its cache_dir
4670 Location for the cache "swap.state" file. This index file holds
4671 the metadata of objects saved on disk. It is used to rebuild
4672 the cache during startup. Normally this file resides in each
4673 'cache_dir' directory, but you may specify an alternate
4674 pathname here. Note you must give a full filename, not just
4675 a directory. Since this is the index for the whole object
4676 list you CANNOT periodically rotate it!
4678 If %s can be used in the file name it will be replaced with a
4679 a representation of the cache_dir name where each / is replaced
4680 with '.'. This is needed to allow adding/removing cache_dir
4681 lines when cache_swap_log is being used.
4683 If have more than one 'cache_dir', and %s is not used in the name
4684 these swap logs will have names such as:
4690 The numbered extension (which is added automatically)
4691 corresponds to the order of the 'cache_dir' lines in this
4692 configuration file. If you change the order of the 'cache_dir'
4693 lines in this file, these index files will NOT correspond to
4694 the correct 'cache_dir' entry (unless you manually rename
4695 them). We recommend you do NOT use this option. It is
4696 better to keep these index files in each 'cache_dir' directory.
4699 NAME: logfile_rotate
4702 LOC: Config.Log.rotateNumber
4704 Specifies the default number of logfile rotations to make when you
4705 type 'squid -k rotate'. The default is 10, which will rotate
4706 with extensions 0 through 9. Setting logfile_rotate to 0 will
4707 disable the file name rotation, but the logfiles are still closed
4708 and re-opened. This will enable you to rename the logfiles
4709 yourself just before sending the rotate signal.
4711 Note, from Squid-3.1 this option is only a default for cache.log,
4712 that log can be rotated separately by using debug_options.
4714 Note, from Squid-3.6 this option is only a default for access.log
4715 recorded by stdio: module. Those logs can be rotated separately by
4716 using the rotate=N option on their access_log directive.
4718 Note, the 'squid -k rotate' command normally sends a USR1
4719 signal to the running squid process. In certain situations
4720 (e.g. on Linux with Async I/O), USR1 is used for other
4721 purposes, so -k rotate uses another signal. It is best to get
4722 in the habit of using 'squid -k rotate' instead of 'kill -USR1
4729 DEFAULT: @DEFAULT_MIME_TABLE@
4730 LOC: Config.mimeTablePathname
4732 Path to Squid's icon configuration file.
4734 You shouldn't need to change this, but the default file contains
4735 examples and formatting information if you do.
4741 LOC: Config.onoff.log_mime_hdrs
4744 The Cache can record both the request and the response MIME
4745 headers for each HTTP transaction. The headers are encoded
4746 safely and will appear as two bracketed fields at the end of
4747 the access log (for either the native or httpd-emulated log
4748 formats). To enable this logging set log_mime_hdrs to 'on'.
4753 DEFAULT: @DEFAULT_PID_FILE@
4754 LOC: Config.pidFilename
4756 A filename to write the process-id to. To disable, enter "none".
4759 NAME: client_netmask
4761 LOC: Config.Addrs.client_netmask
4763 DEFAULT_DOC: Log full client IP address
4765 A netmask for client addresses in logfiles and cachemgr output.
4766 Change this to protect the privacy of your cache clients.
4767 A netmask of 255.255.255.0 will log all IP's in that range with
4768 the last digit set to '0'.
4771 NAME: strip_query_terms
4773 LOC: Config.onoff.strip_query_terms
4776 By default, Squid strips query terms from requested URLs before
4777 logging. This protects your user's privacy and reduces log size.
4779 When investigating HIT/MISS or other caching behaviour you
4780 will need to disable this to see the full URL used by Squid.
4787 LOC: Config.onoff.buffered_logs
4789 Whether to write/send access_log records ASAP or accumulate them and
4790 then write/send them in larger chunks. Buffering may improve
4791 performance because it decreases the number of I/Os. However,
4792 buffering increases the delay before log records become available to
4793 the final recipient (e.g., a disk file or logging daemon) and,
4794 hence, increases the risk of log records loss.
4796 Note that even when buffered_logs are off, Squid may have to buffer
4797 records if it cannot write/send them immediately due to pending I/Os
4798 (e.g., the I/O writing the previous log record) or connectivity loss.
4800 Currently honored by 'daemon' and 'tcp' access_log modules only.
4803 NAME: netdb_filename
4805 DEFAULT: stdio:@DEFAULT_NETDB_FILE@
4806 LOC: Config.netdbFilename
4809 Where Squid stores it's netdb journal.
4810 When enabled this journal preserves netdb state between restarts.
4812 To disable, enter "none".
4816 OPTIONS FOR TROUBLESHOOTING
4817 -----------------------------------------------------------------------------
4822 DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@
4823 LOC: Debug::cache_log
4825 Squid administrative logging file.
4827 This is where general information about Squid behavior goes. You can
4828 increase the amount of data logged to this file and how often it is
4829 rotated with "debug_options"
4835 DEFAULT_DOC: Log all critical and important messages.
4836 LOC: Debug::debugOptions
4838 Logging options are set as section,level where each source file
4839 is assigned a unique section. Lower levels result in less
4840 output, Full debugging (level 9) can result in a very large
4841 log file, so be careful.
4843 The magic word "ALL" sets debugging levels for all sections.
4844 The default is to run with "ALL,1" to record important warnings.
4846 The rotate=N option can be used to keep more or less of these logs
4847 than would otherwise be kept by logfile_rotate.
4848 For most uses a single log should be enough to monitor current
4849 events affecting Squid.
4854 LOC: Config.coredump_dir
4855 DEFAULT_IF_NONE: none
4856 DEFAULT_DOC: Use the directory from where Squid was started.
4858 By default Squid leaves core files in the directory from where
4859 it was started. If you set 'coredump_dir' to a directory
4860 that exists, Squid will chdir() to that directory at startup
4861 and coredump files will be left there.
4865 # Leave coredumps in the first cache dir
4866 coredump_dir @DEFAULT_SWAP_DIR@
4872 OPTIONS FOR FTP GATEWAYING
4873 -----------------------------------------------------------------------------
4879 LOC: Config.Ftp.anon_user
4881 If you want the anonymous login password to be more informative
4882 (and enable the use of picky FTP servers), set this to something
4883 reasonable for your domain, like wwwuser@somewhere.net
4885 The reason why this is domainless by default is the
4886 request can be made on the behalf of a user in any domain,
4887 depending on how the cache is used.
4888 Some FTP server also validate the email address is valid
4889 (for example perl.com).
4895 LOC: Config.Ftp.passive
4897 If your firewall does not allow Squid to use passive
4898 connections, turn off this option.
4900 Use of ftp_epsv_all option requires this to be ON.
4906 LOC: Config.Ftp.epsv_all
4908 FTP Protocol extensions permit the use of a special "EPSV ALL" command.
4910 NATs may be able to put the connection on a "fast path" through the
4911 translator, as the EPRT command will never be used and therefore,
4912 translation of the data portion of the segments will never be needed.
4914 When a client only expects to do two-way FTP transfers this may be
4916 If squid finds that it must do a three-way FTP transfer after issuing
4917 an EPSV ALL command, the FTP session will fail.
4919 If you have any doubts about this option do not use it.
4920 Squid will nicely attempt all other connection methods.
4922 Requires ftp_passive to be ON (default) for any effect.
4928 LOC: Config.accessList.ftp_epsv
4930 FTP Protocol extensions permit the use of a special "EPSV" command.
4932 NATs may be able to put the connection on a "fast path" through the
4933 translator using EPSV, as the EPRT command will never be used
4934 and therefore, translation of the data portion of the segments
4935 will never be needed.
4937 EPSV is often required to interoperate with FTP servers on IPv6
4938 networks. On the other hand, it may break some IPv4 servers.
4940 By default, EPSV may try EPSV with any FTP server. To fine tune
4941 that decision, you may restrict EPSV to certain clients or servers
4944 ftp_epsv allow|deny al1 acl2 ...
4946 WARNING: Disabling EPSV may cause problems with external NAT and IPv6.
4948 Only fast ACLs are supported.
4949 Requires ftp_passive to be ON (default) for any effect.
4955 LOC: Config.Ftp.eprt
4957 FTP Protocol extensions permit the use of a special "EPRT" command.
4959 This extension provides a protocol neutral alternative to the
4960 IPv4-only PORT command. When supported it enables active FTP data
4961 channels over IPv6 and efficient NAT handling.
4963 Turning this OFF will prevent EPRT being attempted and will skip
4964 straight to using PORT for IPv4 servers.
4966 Some devices are known to not handle this extension correctly and
4967 may result in crashes. Devices which suport EPRT enough to fail
4968 cleanly will result in Squid attempting PORT anyway. This directive
4969 should only be disabled when EPRT results in device failures.
4971 WARNING: Doing so will convert Squid back to the old behavior with all
4972 the related problems with external NAT devices/layers and IPv4-only FTP.
4975 NAME: ftp_sanitycheck
4978 LOC: Config.Ftp.sanitycheck
4980 For security and data integrity reasons Squid by default performs
4981 sanity checks of the addresses of FTP data connections ensure the
4982 data connection is to the requested server. If you need to allow
4983 FTP connections to servers using another IP address for the data
4984 connection turn this off.
4987 NAME: ftp_telnet_protocol
4990 LOC: Config.Ftp.telnet
4992 The FTP protocol is officially defined to use the telnet protocol
4993 as transport channel for the control connection. However, many
4994 implementations are broken and does not respect this aspect of
4997 If you have trouble accessing files with ASCII code 255 in the
4998 path or similar problems involving this ASCII code you can
4999 try setting this directive to off. If that helps, report to the
5000 operator of the FTP server in question that their FTP server
5001 is broken and does not follow the FTP standard.
5005 OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
5006 -----------------------------------------------------------------------------
5011 DEFAULT: @DEFAULT_DISKD@
5012 LOC: Config.Program.diskd
5014 Specify the location of the diskd executable.
5015 Note this is only useful if you have compiled in
5016 diskd as one of the store io modules.
5019 NAME: unlinkd_program
5022 DEFAULT: @DEFAULT_UNLINKD@
5023 LOC: Config.Program.unlinkd
5025 Specify the location of the executable for file deletion process.
5028 NAME: pinger_program
5031 DEFAULT: @DEFAULT_PINGER@
5034 Specify the location of the executable for the pinger process.
5043 Control whether the pinger is active at run-time.
5044 Enables turning ICMP pinger on and off with a simple
5045 squid -k reconfigure.
5050 OPTIONS FOR URL REWRITING
5051 -----------------------------------------------------------------------------
5054 NAME: url_rewrite_program redirect_program
5056 LOC: Config.Program.redirect
5059 Specify the location of the executable URL rewriter to use.
5060 Since they can perform almost any function there isn't one included.
5062 For each requested URL, the rewriter will receive on line with the format
5064 [channel-ID <SP>] URL [<SP> extras]<NL>
5066 See url_rewrite_extras on how to send "extras" with optional values to
5068 After processing the request the helper must reply using the following format:
5070 [channel-ID <SP>] result [<SP> kv-pairs]
5072 The result code can be:
5074 OK status=30N url="..."
5075 Redirect the URL to the one supplied in 'url='.
5076 'status=' is optional and contains the status code to send
5077 the client in Squids HTTP response. It must be one of the
5078 HTTP redirect status codes: 301, 302, 303, 307, 308.
5079 When no status is given Squid will use 302.
5081 OK rewrite-url="..."
5082 Rewrite the URL to the one supplied in 'rewrite-url='.
5083 The new URL is fetched directly by Squid and returned to
5084 the client as the response to its request.
5087 When neither of url= and rewrite-url= are sent Squid does
5091 Do not change the URL.
5094 An internal error occurred in the helper, preventing
5095 a result being identified. The 'message=' key name is
5096 reserved for delivering a log message.
5099 In addition to the above kv-pairs Squid also understands the following
5100 optional kv-pairs received from URL rewriters:
5102 Associates a TAG with the client TCP connection.
5103 The TAG is treated as a regular annotation but persists across
5104 future requests on the client connection rather than just the
5105 current request. A helper may update the TAG during subsequent
5106 requests be returning a new kv-pair.
5108 When using the concurrency= option the protocol is changed by
5109 introducing a query channel tag in front of the request/response.
5110 The query channel tag is a number between 0 and concurrency-1.
5111 This value must be echoed back unchanged to Squid as the first part
5112 of the response relating to its request.
5114 WARNING: URL re-writing ability should be avoided whenever possible.
5115 Use the URL redirect form of response instead.
5117 Re-write creates a difference in the state held by the client
5118 and server. Possibly causing confusion when the server response
5119 contains snippets of its view state. Embeded URLs, response
5120 and content Location headers, etc. are not re-written by this
5123 By default, a URL rewriter is not used.
5126 NAME: url_rewrite_children redirect_children
5127 TYPE: HelperChildConfig
5128 DEFAULT: 20 startup=0 idle=1 concurrency=0
5129 LOC: Config.redirectChildren
5131 The maximum number of redirector processes to spawn. If you limit
5132 it too few Squid will have to wait for them to process a backlog of
5133 URLs, slowing it down. If you allow too many they will use RAM
5134 and other system resources noticably.
5136 The startup= and idle= options allow some measure of skew in your
5141 Sets a minimum of how many processes are to be spawned when Squid
5142 starts or reconfigures. When set to zero the first request will
5143 cause spawning of the first child process to handle it.
5145 Starting too few will cause an initial slowdown in traffic as Squid
5146 attempts to simultaneously spawn enough processes to cope.
5150 Sets a minimum of how many processes Squid is to try and keep available
5151 at all times. When traffic begins to rise above what the existing
5152 processes can handle this many more will be spawned up to the maximum
5153 configured. A minimum setting of 1 is required.
5157 The number of requests each redirector helper can handle in
5158 parallel. Defaults to 0 which indicates the redirector
5159 is a old-style single threaded redirector.
5161 When this directive is set to a value >= 1 then the protocol
5162 used to communicate with the helper is modified to include
5163 an ID in front of the request/response. The ID from the request
5164 must be echoed back with the response to that request.
5168 Sets the maximum number of queued requests to N. The default maximum
5169 is 2*numberofchildren. If the queued requests exceed queue size and
5170 redirector_bypass configuration option is set, then redirector is bypassed.
5171 Otherwise, Squid is allowed to temporarily exceed the configured maximum,
5172 marking the affected helper as "overloaded". If the helper overload lasts
5173 more than 3 minutes, the action prescribed by the on-persistent-overload
5176 on-persistent-overload=action
5178 Specifies Squid reaction to a new helper request arriving when the helper
5179 has been overloaded for more that 3 minutes already. The number of queued
5180 requests determines whether the helper is overloaded (see the queue-size
5183 Two actions are supported:
5185 die Squid worker quits. This is the default behavior.
5187 ERR Squid treats the helper request as if it was
5188 immediately submitted, and the helper immediately
5189 replied with an ERR response. This action has no effect
5190 on the already queued and in-progress helper requests.
5193 NAME: url_rewrite_host_header redirect_rewrites_host_header
5196 LOC: Config.onoff.redir_rewrites_host
5198 To preserve same-origin security policies in browsers and
5199 prevent Host: header forgery by redirectors Squid rewrites
5200 any Host: header in redirected requests.
5202 If you are running an accelerator this may not be a wanted
5203 effect of a redirector. This directive enables you disable
5204 Host: alteration in reverse-proxy traffic.
5206 WARNING: Entries are cached on the result of the URL rewriting
5207 process, so be careful if you have domain-virtual hosts.
5209 WARNING: Squid and other software verifies the URL and Host
5210 are matching, so be careful not to relay through other proxies
5211 or inspecting firewalls with this disabled.
5214 NAME: url_rewrite_access redirector_access
5217 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
5218 LOC: Config.accessList.redirector
5220 If defined, this access list specifies which requests are
5221 sent to the redirector processes.
5223 This clause supports both fast and slow acl types.
5224 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5227 NAME: url_rewrite_bypass redirector_bypass
5229 LOC: Config.onoff.redirector_bypass
5232 When this is 'on', a request will not go through the
5233 redirector if all the helpers are busy. If this is 'off' and the
5234 redirector queue grows too large, the action is prescribed by the
5235 on-persistent-overload option. You should only enable this if the
5236 redirectors are not critical to your caching system. If you use
5237 redirectors for access control, and you enable this option,
5238 users may have access to pages they should not
5239 be allowed to request.
5240 This options sets default queue-size option of the url_rewrite_children
5244 NAME: url_rewrite_extras
5245 TYPE: TokenOrQuotedString
5246 LOC: Config.redirector_extras
5247 DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
5249 Specifies a string to be append to request line format for the
5250 rewriter helper. "Quoted" format values may contain spaces and
5251 logformat %macros. In theory, any logformat %macro can be used.
5252 In practice, a %macro expands as a dash (-) if the helper request is
5253 sent before the required macro information is available to Squid.
5256 NAME: url_rewrite_timeout
5257 TYPE: UrlHelperTimeout
5258 LOC: Config.onUrlRewriteTimeout
5260 DEFAULT_DOC: Squid waits for the helper response forever
5262 Squid times active requests to redirector. The timeout value and Squid
5263 reaction to a timed out request are configurable using the following
5266 url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>]
5268 supported timeout actions:
5269 fail Squid return a ERR_GATEWAY_FAILURE error page
5271 bypass Do not re-write the URL
5273 retry Send the lookup to the helper again
5275 use_configured_response
5276 Use the <quoted-response> as helper response
5280 OPTIONS FOR STORE ID
5281 -----------------------------------------------------------------------------
5284 NAME: store_id_program storeurl_rewrite_program
5286 LOC: Config.Program.store_id
5289 Specify the location of the executable StoreID helper to use.
5290 Since they can perform almost any function there isn't one included.
5292 For each requested URL, the helper will receive one line with the format
5294 [channel-ID <SP>] URL [<SP> extras]<NL>
5297 After processing the request the helper must reply using the following format:
5299 [channel-ID <SP>] result [<SP> kv-pairs]
5301 The result code can be:
5304 Use the StoreID supplied in 'store-id='.
5307 The default is to use HTTP request URL as the store ID.
5310 An internal error occured in the helper, preventing
5311 a result being identified.
5313 In addition to the above kv-pairs Squid also understands the following
5314 optional kv-pairs received from URL rewriters:
5316 Associates a TAG with the client TCP connection.
5317 Please see url_rewrite_program related documentation for this
5320 Helper programs should be prepared to receive and possibly ignore
5321 additional whitespace-separated tokens on each input line.
5323 When using the concurrency= option the protocol is changed by
5324 introducing a query channel tag in front of the request/response.
5325 The query channel tag is a number between 0 and concurrency-1.
5326 This value must be echoed back unchanged to Squid as the first part
5327 of the response relating to its request.
5329 NOTE: when using StoreID refresh_pattern will apply to the StoreID
5330 returned from the helper and not the URL.
5332 WARNING: Wrong StoreID value returned by a careless helper may result
5333 in the wrong cached response returned to the user.
5335 By default, a StoreID helper is not used.
5338 NAME: store_id_extras
5339 TYPE: TokenOrQuotedString
5340 LOC: Config.storeId_extras
5341 DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
5343 Specifies a string to be append to request line format for the
5344 StoreId helper. "Quoted" format values may contain spaces and
5345 logformat %macros. In theory, any logformat %macro can be used.
5346 In practice, a %macro expands as a dash (-) if the helper request is
5347 sent before the required macro information is available to Squid.
5350 NAME: store_id_children storeurl_rewrite_children
5351 TYPE: HelperChildConfig
5352 DEFAULT: 20 startup=0 idle=1 concurrency=0
5353 LOC: Config.storeIdChildren
5355 The maximum number of StoreID helper processes to spawn. If you limit
5356 it too few Squid will have to wait for them to process a backlog of
5357 requests, slowing it down. If you allow too many they will use RAM
5358 and other system resources noticably.
5360 The startup= and idle= options allow some measure of skew in your
5365 Sets a minimum of how many processes are to be spawned when Squid
5366 starts or reconfigures. When set to zero the first request will
5367 cause spawning of the first child process to handle it.
5369 Starting too few will cause an initial slowdown in traffic as Squid
5370 attempts to simultaneously spawn enough processes to cope.
5374 Sets a minimum of how many processes Squid is to try and keep available
5375 at all times. When traffic begins to rise above what the existing
5376 processes can handle this many more will be spawned up to the maximum
5377 configured. A minimum setting of 1 is required.
5381 The number of requests each storeID helper can handle in
5382 parallel. Defaults to 0 which indicates the helper
5383 is a old-style single threaded program.
5385 When this directive is set to a value >= 1 then the protocol
5386 used to communicate with the helper is modified to include
5387 an ID in front of the request/response. The ID from the request
5388 must be echoed back with the response to that request.
5392 Sets the maximum number of queued requests to N. The default maximum
5393 is 2*numberofchildren. If the queued requests exceed queue size and
5394 redirector_bypass configuration option is set, then redirector is bypassed.
5395 Otherwise, Squid is allowed to temporarily exceed the configured maximum,
5396 marking the affected helper as "overloaded". If the helper overload lasts
5397 more than 3 minutes, the action prescribed by the on-persistent-overload
5400 on-persistent-overload=action
5402 Specifies Squid reaction to a new helper request arriving when the helper
5403 has been overloaded for more that 3 minutes already. The number of queued
5404 requests determines whether the helper is overloaded (see the queue-size
5407 Two actions are supported:
5409 die Squid worker quits. This is the default behavior.
5411 ERR Squid treats the helper request as if it was
5412 immediately submitted, and the helper immediately
5413 replied with an ERR response. This action has no effect
5414 on the already queued and in-progress helper requests.
5417 NAME: store_id_access storeurl_rewrite_access
5420 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
5421 LOC: Config.accessList.store_id
5423 If defined, this access list specifies which requests are
5424 sent to the StoreID processes. By default all requests
5427 This clause supports both fast and slow acl types.
5428 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5431 NAME: store_id_bypass storeurl_rewrite_bypass
5433 LOC: Config.onoff.store_id_bypass
5436 When this is 'on', a request will not go through the
5437 helper if all helpers are busy. If this is 'off' and the helper
5438 queue grows too large, the action is prescribed by the
5439 on-persistent-overload option. You should only enable this if the
5440 helpers are not critical to your caching system. If you use
5441 helpers for critical caching components, and you enable this
5442 option, users may not get objects from cache.
5443 This options sets default queue-size option of the store_id_children
5448 OPTIONS FOR TUNING THE CACHE
5449 -----------------------------------------------------------------------------
5452 NAME: cache no_cache
5455 DEFAULT_DOC: By default, this directive is unused and has no effect.
5456 LOC: Config.accessList.noCache
5458 Requests denied by this directive will not be served from the cache
5459 and their responses will not be stored in the cache. This directive
5460 has no effect on other transactions and on already cached responses.
5462 This clause supports both fast and slow acl types.
5463 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5465 This and the two other similar caching directives listed below are
5466 checked at different transaction processing stages, have different
5467 access to response information, affect different cache operations,
5468 and differ in slow ACLs support:
5470 * cache: Checked before Squid makes a hit/miss determination.
5471 No access to reply information!
5472 Denies both serving a hit and storing a miss.
5473 Supports both fast and slow ACLs.
5474 * send_hit: Checked after a hit was detected.
5475 Has access to reply (hit) information.
5476 Denies serving a hit only.
5477 Supports fast ACLs only.
5478 * store_miss: Checked before storing a cachable miss.
5479 Has access to reply (miss) information.
5480 Denies storing a miss only.
5481 Supports fast ACLs only.
5483 If you are not sure which of the three directives to use, apply the
5484 following decision logic:
5486 * If your ACL(s) are of slow type _and_ need response info, redesign.
5487 Squid does not support that particular combination at this time.
5489 * If your directive ACL(s) are of slow type, use "cache"; and/or
5490 * if your directive ACL(s) need no response info, use "cache".
5492 * If you do not want the response cached, use store_miss; and/or
5493 * if you do not want a hit on a cached response, use send_hit.
5499 DEFAULT_DOC: By default, this directive is unused and has no effect.
5500 LOC: Config.accessList.sendHit
5502 Responses denied by this directive will not be served from the cache
5503 (but may still be cached, see store_miss). This directive has no
5504 effect on the responses it allows and on the cached objects.
5506 Please see the "cache" directive for a summary of differences among
5507 store_miss, send_hit, and cache directives.
5509 Unlike the "cache" directive, send_hit only supports fast acl
5510 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5514 # apply custom Store ID mapping to some URLs
5515 acl MapMe dstdomain .c.example.com
5516 store_id_program ...
5517 store_id_access allow MapMe
5519 # but prevent caching of special responses
5520 # such as 302 redirects that cause StoreID loops
5521 acl Ordinary http_status 200-299
5522 store_miss deny MapMe !Ordinary
5524 # and do not serve any previously stored special responses
5525 # from the cache (in case they were already cached before
5526 # the above store_miss rule was in effect).
5527 send_hit deny MapMe !Ordinary
5533 DEFAULT_DOC: By default, this directive is unused and has no effect.
5534 LOC: Config.accessList.storeMiss
5536 Responses denied by this directive will not be cached (but may still
5537 be served from the cache, see send_hit). This directive has no
5538 effect on the responses it allows and on the already cached responses.
5540 Please see the "cache" directive for a summary of differences among
5541 store_miss, send_hit, and cache directives. See the
5542 send_hit directive for a usage example.
5544 Unlike the "cache" directive, store_miss only supports fast acl
5545 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5551 LOC: Config.maxStale
5554 This option puts an upper limit on how stale content Squid
5555 will serve from the cache if cache validation fails.
5556 Can be overriden by the refresh_pattern max-stale option.
5559 NAME: refresh_pattern
5560 TYPE: refreshpattern
5564 usage: refresh_pattern [-i] regex min percent max [options]
5566 By default, regular expressions are CASE-SENSITIVE. To make
5567 them case-insensitive, use the -i option.
5569 'Min' is the time (in minutes) an object without an explicit
5570 expiry time should be considered fresh. The recommended
5571 value is 0, any higher values may cause dynamic applications
5572 to be erroneously cached unless the application designer
5573 has taken the appropriate actions.
5575 'Percent' is a percentage of the objects age (time since last
5576 modification age) an object without explicit expiry time
5577 will be considered fresh.
5579 'Max' is an upper limit on how long objects without an explicit
5580 expiry time will be considered fresh.
5582 options: override-expire
5592 override-expire enforces min age even if the server
5593 sent an explicit expiry time (e.g., with the
5594 Expires: header or Cache-Control: max-age). Doing this
5595 VIOLATES the HTTP standard. Enabling this feature
5596 could make you liable for problems which it causes.
5598 Note: override-expire does not enforce staleness - it only extends
5599 freshness / min. If the server returns a Expires time which
5600 is longer than your max time, Squid will still consider
5601 the object fresh for that period of time.
5603 override-lastmod enforces min age even on objects
5604 that were modified recently.
5606 reload-into-ims changes a client no-cache or ``reload''
5607 request for a cached entry into a conditional request using
5608 If-Modified-Since and/or If-None-Match headers, provided the
5609 cached entry has a Last-Modified and/or a strong ETag header.
5610 Doing this VIOLATES the HTTP standard. Enabling this feature
5611 could make you liable for problems which it causes.
5613 ignore-reload ignores a client no-cache or ``reload''
5614 header. Doing this VIOLATES the HTTP standard. Enabling
5615 this feature could make you liable for problems which
5618 ignore-no-store ignores any ``Cache-control: no-store''
5619 headers received from a server. Doing this VIOLATES
5620 the HTTP standard. Enabling this feature could make you
5621 liable for problems which it causes.
5623 ignore-private ignores any ``Cache-control: private''
5624 headers received from a server. Doing this VIOLATES
5625 the HTTP standard. Enabling this feature could make you
5626 liable for problems which it causes.
5628 refresh-ims causes squid to contact the origin server
5629 when a client issues an If-Modified-Since request. This
5630 ensures that the client will receive an updated version
5631 if one is available.
5633 store-stale stores responses even if they don't have explicit
5634 freshness or a validator (i.e., Last-Modified or an ETag)
5635 present, or if they're already stale. By default, Squid will
5636 not cache such responses because they usually can't be
5637 reused. Note that such responses will be stale by default.
5639 max-stale=NN provide a maximum staleness factor. Squid won't
5640 serve objects more stale than this even if it failed to
5641 validate the object. Default: use the max_stale global limit.
5643 Basically a cached object is:
5645 FRESH if expire > now, else STALE
5647 FRESH if lm-factor < percent, else STALE
5651 The refresh_pattern lines are checked in the order listed here.
5652 The first entry which matches is used. If none of the entries
5653 match the default will be used.
5655 Note, you must uncomment all the default lines if you want
5656 to change one. The default setting is only active if none is
5662 # Add any of your own refresh_pattern entries above these.
5664 refresh_pattern ^ftp: 1440 20% 10080
5665 refresh_pattern ^gopher: 1440 0% 1440
5666 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
5667 refresh_pattern . 0 20% 4320
5671 NAME: quick_abort_min
5675 LOC: Config.quickAbort.min
5678 NAME: quick_abort_max
5682 LOC: Config.quickAbort.max
5685 NAME: quick_abort_pct
5689 LOC: Config.quickAbort.pct
5691 The cache by default continues downloading aborted requests
5692 which are almost completed (less than 16 KB remaining). This
5693 may be undesirable on slow (e.g. SLIP) links and/or very busy
5694 caches. Impatient users may tie up file descriptors and
5695 bandwidth by repeatedly requesting and immediately aborting
5698 When the user aborts a request, Squid will check the
5699 quick_abort values to the amount of data transferred until
5702 If the transfer has less than 'quick_abort_min' KB remaining,
5703 it will finish the retrieval.
5705 If the transfer has more than 'quick_abort_max' KB remaining,
5706 it will abort the retrieval.
5708 If more than 'quick_abort_pct' of the transfer has completed,
5709 it will finish the retrieval.
5711 If you do not want any retrieval to continue after the client
5712 has aborted, set both 'quick_abort_min' and 'quick_abort_max'
5715 If you want retrievals to always continue if they are being
5716 cached set 'quick_abort_min' to '-1 KB'.
5719 NAME: read_ahead_gap
5720 COMMENT: buffer-size
5722 LOC: Config.readAheadGap
5725 The amount of data the cache will buffer ahead of what has been
5726 sent to the client when retrieving an object from another server.
5730 IFDEF: USE_HTTP_VIOLATIONS
5733 LOC: Config.negativeTtl
5736 Set the Default Time-to-Live (TTL) for failed requests.
5737 Certain types of failures (such as "connection refused" and
5738 "404 Not Found") are able to be negatively-cached for a short time.
5739 Modern web servers should provide Expires: header, however if they
5740 do not this can provide a minimum TTL.
5741 The default is not to cache errors with unknown expiry details.
5743 Note that this is different from negative caching of DNS lookups.
5745 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5746 this feature could make you liable for problems which it
5750 NAME: positive_dns_ttl
5753 LOC: Config.positiveDnsTtl
5756 Upper limit on how long Squid will cache positive DNS responses.
5757 Default is 6 hours (360 minutes). This directive must be set
5758 larger than negative_dns_ttl.
5761 NAME: negative_dns_ttl
5764 LOC: Config.negativeDnsTtl
5767 Time-to-Live (TTL) for negative caching of failed DNS lookups.
5768 This also sets the lower cache limit on positive lookups.
5769 Minimum value is 1 second, and it is not recommendable to go
5770 much below 10 seconds.
5773 NAME: range_offset_limit
5774 COMMENT: size [acl acl...]
5776 LOC: Config.rangeOffsetLimit
5779 usage: (size) [units] [[!]aclname]
5781 Sets an upper limit on how far (number of bytes) into the file
5782 a Range request may be to cause Squid to prefetch the whole file.
5783 If beyond this limit, Squid forwards the Range request as it is and
5784 the result is NOT cached.
5786 This is to stop a far ahead range request (lets say start at 17MB)
5787 from making Squid fetch the whole object up to that point before
5788 sending anything to the client.
5790 Multiple range_offset_limit lines may be specified, and they will
5791 be searched from top to bottom on each request until a match is found.
5792 The first match found will be used. If no line matches a request, the
5793 default limit of 0 bytes will be used.
5795 'size' is the limit specified as a number of units.
5797 'units' specifies whether to use bytes, KB, MB, etc.
5798 If no units are specified bytes are assumed.
5800 A size of 0 causes Squid to never fetch more than the
5801 client requested. (default)
5803 A size of 'none' causes Squid to always fetch the object from the
5804 beginning so it may cache the result. (2.0 style)
5806 'aclname' is the name of a defined ACL.
5808 NP: Using 'none' as the byte value here will override any quick_abort settings
5809 that may otherwise apply to the range request. The range request will
5810 be fully fetched from start to finish regardless of the client
5811 actions. This affects bandwidth usage.
5814 NAME: minimum_expiry_time
5817 LOC: Config.minimum_expiry_time
5820 The minimum caching time according to (Expires - Date)
5821 headers Squid honors if the object can't be revalidated.
5822 The default is 60 seconds.
5824 In reverse proxy environments it might be desirable to honor
5825 shorter object lifetimes. It is most likely better to make
5826 your server return a meaningful Last-Modified header however.
5828 In ESI environments where page fragments often have short
5829 lifetimes, this will often be best set to 0.
5832 NAME: store_avg_object_size
5836 LOC: Config.Store.avgObjectSize
5838 Average object size, used to estimate number of objects your
5839 cache can hold. The default is 13 KB.
5841 This is used to pre-seed the cache index memory allocation to
5842 reduce expensive reallocate operations while handling clients
5843 traffic. Too-large values may result in memory allocation during
5844 peak traffic, too-small values will result in wasted memory.
5846 Check the cache manager 'info' report metrics for the real
5847 object sizes seen by your Squid before tuning this.
5850 NAME: store_objects_per_bucket
5853 LOC: Config.Store.objectsPerBucket
5855 Target number of objects per bucket in the store hash table.
5856 Lowering this value increases the total number of buckets and
5857 also the storage maintenance rate. The default is 20.
5862 -----------------------------------------------------------------------------
5865 NAME: request_header_max_size
5869 LOC: Config.maxRequestHeaderSize
5871 This specifies the maximum size for HTTP headers in a request.
5872 Request headers are usually relatively small (about 512 bytes).
5873 Placing a limit on the request header size will catch certain
5874 bugs (for example with persistent connections) and possibly
5875 buffer-overflow or denial-of-service attacks.
5878 NAME: reply_header_max_size
5882 LOC: Config.maxReplyHeaderSize
5884 This specifies the maximum size for HTTP headers in a reply.
5885 Reply headers are usually relatively small (about 512 bytes).
5886 Placing a limit on the reply header size will catch certain
5887 bugs (for example with persistent connections) and possibly
5888 buffer-overflow or denial-of-service attacks.
5891 NAME: request_body_max_size
5895 DEFAULT_DOC: No limit.
5896 LOC: Config.maxRequestBodySize
5898 This specifies the maximum size for an HTTP request body.
5899 In other words, the maximum size of a PUT/POST request.
5900 A user who attempts to send a request with a body larger
5901 than this limit receives an "Invalid Request" error message.
5902 If you set this parameter to a zero (the default), there will
5903 be no limit imposed.
5905 See also client_request_buffer_max_size for an alternative
5906 limitation on client uploads which can be configured.
5909 NAME: client_request_buffer_max_size
5913 LOC: Config.maxRequestBufferSize
5915 This specifies the maximum buffer size of a client request.
5916 It prevents squid eating too much memory when somebody uploads
5921 IFDEF: USE_HTTP_VIOLATIONS
5924 DEFAULT_DOC: Obey RFC 2616.
5925 LOC: Config.accessList.brokenPosts
5927 A list of ACL elements which, if matched, causes Squid to send
5928 an extra CRLF pair after the body of a PUT/POST request.
5930 Some HTTP servers has broken implementations of PUT/POST,
5931 and rely on an extra CRLF pair sent by some WWW clients.
5933 Quote from RFC2616 section 4.1 on this matter:
5935 Note: certain buggy HTTP/1.0 client implementations generate an
5936 extra CRLF's after a POST request. To restate what is explicitly
5937 forbidden by the BNF, an HTTP/1.1 client must not preface or follow
5938 a request with an extra CRLF.
5940 This clause only supports fast acl types.
5941 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5944 acl buggy_server url_regex ^http://....
5945 broken_posts allow buggy_server
5948 NAME: adaptation_uses_indirect_client icap_uses_indirect_client
5951 IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION
5953 LOC: Adaptation::Config::use_indirect_client
5955 Controls whether the indirect client IP address (instead of the direct
5956 client IP address) is passed to adaptation services.
5958 See also: follow_x_forwarded_for adaptation_send_client_ip
5962 IFDEF: USE_HTTP_VIOLATIONS
5966 LOC: Config.onoff.via
5968 If set (default), Squid will include a Via header in requests and
5969 replies as required by RFC2616.
5972 NAME: vary_ignore_expire
5975 LOC: Config.onoff.vary_ignore_expire
5978 Many HTTP servers supporting Vary gives such objects
5979 immediate expiry time with no cache-control header
5980 when requested by a HTTP/1.0 client. This option
5981 enables Squid to ignore such expiry times until
5982 HTTP/1.1 is fully implemented.
5984 WARNING: If turned on this may eventually cause some
5985 varying objects not intended for caching to get cached.
5988 NAME: request_entities
5990 LOC: Config.onoff.request_entities
5993 Squid defaults to deny GET and HEAD requests with request entities,
5994 as the meaning of such requests are undefined in the HTTP standard
5995 even if not explicitly forbidden.
5997 Set this directive to on if you have clients which insists
5998 on sending request entities in GET or HEAD requests. But be warned
5999 that there is server software (both proxies and web servers) which
6000 can fail to properly process this kind of request which may make you
6001 vulnerable to cache pollution attacks if enabled.
6004 NAME: request_header_access
6005 IFDEF: USE_HTTP_VIOLATIONS
6006 TYPE: http_header_access
6007 LOC: Config.request_header_access
6009 DEFAULT_DOC: No limits.
6011 Usage: request_header_access header_name allow|deny [!]aclname ...
6013 WARNING: Doing this VIOLATES the HTTP standard. Enabling
6014 this feature could make you liable for problems which it
6017 This option replaces the old 'anonymize_headers' and the
6018 older 'http_anonymizer' option with something that is much
6019 more configurable. A list of ACLs for each header name allows
6020 removal of specific header fields under specific conditions.
6022 This option only applies to outgoing HTTP request headers (i.e.,
6023 headers sent by Squid to the next HTTP hop such as a cache peer
6024 or an origin server). The option has no effect during cache hit
6025 detection. The equivalent adaptation vectoring point in ICAP
6026 terminology is post-cache REQMOD.
6028 The option is applied to individual outgoing request header
6029 fields. For each request header field F, Squid uses the first
6030 qualifying sets of request_header_access rules:
6032 1. Rules with header_name equal to F's name.
6033 2. Rules with header_name 'Other', provided F's name is not
6034 on the hard-coded list of commonly used HTTP header names.
6035 3. Rules with header_name 'All'.
6037 Within that qualifying rule set, rule ACLs are checked as usual.
6038 If ACLs of an "allow" rule match, the header field is allowed to
6039 go through as is. If ACLs of a "deny" rule match, the header is
6040 removed and request_header_replace is then checked to identify
6041 if the removed header has a replacement. If no rules within the
6042 set have matching ACLs, the header field is left as is.
6044 For example, to achieve the same behavior as the old
6045 'http_anonymizer standard' option, you should use:
6047 request_header_access From deny all
6048 request_header_access Referer deny all
6049 request_header_access User-Agent deny all
6051 Or, to reproduce the old 'http_anonymizer paranoid' feature
6054 request_header_access Authorization allow all
6055 request_header_access Proxy-Authorization allow all
6056 request_header_access Cache-Control allow all
6057 request_header_access Content-Length allow all
6058 request_header_access Content-Type allow all
6059 request_header_access Date allow all
6060 request_header_access Host allow all
6061 request_header_access If-Modified-Since allow all
6062 request_header_access Pragma allow all
6063 request_header_access Accept allow all
6064 request_header_access Accept-Charset allow all
6065 request_header_access Accept-Encoding allow all
6066 request_header_access Accept-Language allow all
6067 request_header_access Connection allow all
6068 request_header_access All deny all
6070 HTTP reply headers are controlled with the reply_header_access directive.
6072 By default, all headers are allowed (no anonymizing is performed).
6075 NAME: reply_header_access
6076 IFDEF: USE_HTTP_VIOLATIONS
6077 TYPE: http_header_access
6078 LOC: Config.reply_header_access
6080 DEFAULT_DOC: No limits.
6082 Usage: reply_header_access header_name allow|deny [!]aclname ...
6084 WARNING: Doing this VIOLATES the HTTP standard. Enabling
6085 this feature could make you liable for problems which it
6088 This option only applies to reply headers, i.e., from the
6089 server to the client.
6091 This is the same as request_header_access, but in the other
6092 direction. Please see request_header_access for detailed
6095 For example, to achieve the same behavior as the old
6096 'http_anonymizer standard' option, you should use:
6098 reply_header_access Server deny all
6099 reply_header_access WWW-Authenticate deny all
6100 reply_header_access Link deny all
6102 Or, to reproduce the old 'http_anonymizer paranoid' feature
6105 reply_header_access Allow allow all
6106 reply_header_access WWW-Authenticate allow all
6107 reply_header_access Proxy-Authenticate allow all
6108 reply_header_access Cache-Control allow all
6109 reply_header_access Content-Encoding allow all
6110 reply_header_access Content-Length allow all
6111 reply_header_access Content-Type allow all
6112 reply_header_access Date allow all
6113 reply_header_access Expires allow all
6114 reply_header_access Last-Modified allow all
6115 reply_header_access Location allow all
6116 reply_header_access Pragma allow all
6117 reply_header_access Content-Language allow all
6118 reply_header_access Retry-After allow all
6119 reply_header_access Title allow all
6120 reply_header_access Content-Disposition allow all
6121 reply_header_access Connection allow all
6122 reply_header_access All deny all
6124 HTTP request headers are controlled with the request_header_access directive.
6126 By default, all headers are allowed (no anonymizing is
6130 NAME: request_header_replace header_replace
6131 IFDEF: USE_HTTP_VIOLATIONS
6132 TYPE: http_header_replace
6133 LOC: Config.request_header_access
6136 Usage: request_header_replace header_name message
6137 Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
6139 This option allows you to change the contents of headers
6140 denied with request_header_access above, by replacing them
6141 with some fixed string.
6143 This only applies to request headers, not reply headers.
6145 By default, headers are removed if denied.
6148 NAME: reply_header_replace
6149 IFDEF: USE_HTTP_VIOLATIONS
6150 TYPE: http_header_replace
6151 LOC: Config.reply_header_access
6154 Usage: reply_header_replace header_name message
6155 Example: reply_header_replace Server Foo/1.0
6157 This option allows you to change the contents of headers
6158 denied with reply_header_access above, by replacing them
6159 with some fixed string.
6161 This only applies to reply headers, not request headers.
6163 By default, headers are removed if denied.
6166 NAME: request_header_add
6167 TYPE: HeaderWithAclList
6168 LOC: Config.request_header_add
6171 Usage: request_header_add field-name field-value [ acl ... ]
6172 Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
6174 This option adds header fields to outgoing HTTP requests (i.e.,
6175 request headers sent by Squid to the next HTTP hop such as a
6176 cache peer or an origin server). The option has no effect during
6177 cache hit detection. The equivalent adaptation vectoring point
6178 in ICAP terminology is post-cache REQMOD.
6180 Field-name is a token specifying an HTTP header name. If a
6181 standard HTTP header name is used, Squid does not check whether
6182 the new header conflicts with any existing headers or violates
6183 HTTP rules. If the request to be modified already contains a
6184 field with the same name, the old field is preserved but the
6185 header field values are not merged.
6187 Field-value is either a token or a quoted string. If quoted
6188 string format is used, then the surrounding quotes are removed
6189 while escape sequences and %macros are processed.
6191 One or more Squid ACLs may be specified to restrict header
6192 injection to matching requests. As always in squid.conf, all
6193 ACLs in the ACL list must be satisfied for the insertion to
6194 happen. The request_header_add supports fast ACLs only.
6196 See also: reply_header_add.
6199 NAME: reply_header_add
6200 TYPE: HeaderWithAclList
6201 LOC: Config.reply_header_add
6204 Usage: reply_header_add field-name field-value [ acl ... ]
6205 Example: reply_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
6207 This option adds header fields to outgoing HTTP responses (i.e., response
6208 headers delivered by Squid to the client). This option has no effect on
6209 cache hit detection. The equivalent adaptation vectoring point in
6210 ICAP terminology is post-cache RESPMOD. This option does not apply to
6211 successful CONNECT replies.
6213 Field-name is a token specifying an HTTP header name. If a
6214 standard HTTP header name is used, Squid does not check whether
6215 the new header conflicts with any existing headers or violates
6216 HTTP rules. If the response to be modified already contains a
6217 field with the same name, the old field is preserved but the
6218 header field values are not merged.
6220 Field-value is either a token or a quoted string. If quoted
6221 string format is used, then the surrounding quotes are removed
6222 while escape sequences and %macros are processed.
6224 One or more Squid ACLs may be specified to restrict header
6225 injection to matching responses. As always in squid.conf, all
6226 ACLs in the ACL list must be satisfied for the insertion to
6227 happen. The reply_header_add option supports fast ACLs only.
6229 See also: request_header_add.
6237 This option used to log custom information about the master
6238 transaction. For example, an admin may configure Squid to log
6239 which "user group" the transaction belongs to, where "user group"
6240 will be determined based on a set of ACLs and not [just]
6241 authentication information.
6242 Values of key/value pairs can be logged using %{key}note macros:
6244 note key value acl ...
6245 logformat myFormat ... %{key}note ...
6248 NAME: relaxed_header_parser
6249 COMMENT: on|off|warn
6251 LOC: Config.onoff.relaxed_header_parser
6254 In the default "on" setting Squid accepts certain forms
6255 of non-compliant HTTP messages where it is unambiguous
6256 what the sending application intended even if the message
6257 is not correctly formatted. The messages is then normalized
6258 to the correct form when forwarded by Squid.
6260 If set to "warn" then a warning will be emitted in cache.log
6261 each time such HTTP error is encountered.
6263 If set to "off" then such HTTP errors will cause the request
6264 or response to be rejected.
6267 NAME: collapsed_forwarding
6270 LOC: Config.onoff.collapsed_forwarding
6273 This option controls whether Squid is allowed to merge multiple
6274 potentially cachable requests for the same URI before Squid knows
6275 whether the response is going to be cachable.
6277 When enabled, instead of forwarding each concurrent request for
6278 the same URL, Squid just sends the first of them. The other, so
6279 called "collapsed" requests, wait for the response to the first
6280 request and, if it happens to be cachable, use that response.
6281 Here, "concurrent requests" means "received after the first
6282 request headers were parsed and before the corresponding response
6283 headers were parsed".
6285 This feature is disabled by default: enabling collapsed
6286 forwarding needlessly delays forwarding requests that look
6287 cachable (when they are collapsed) but then need to be forwarded
6288 individually anyway because they end up being for uncachable
6289 content. However, in some cases, such as acceleration of highly
6290 cachable content with periodic or grouped expiration times, the
6291 gains from collapsing [large volumes of simultaneous refresh
6292 requests] outweigh losses from such delays.
6294 Squid collapses two kinds of requests: regular client requests
6295 received on one of the listening ports and internal "cache
6296 revalidation" requests which are triggered by those regular
6297 requests hitting a stale cached object. Revalidation collapsing
6298 is currently disabled for Squid instances containing SMP-aware
6299 disk or memory caches and for Vary-controlled cached objects.
6302 NAME: collapsed_forwarding_shared_entries_limit
6303 COMMENT: (number of entries)
6305 LOC: Config.collapsed_forwarding_shared_entries_limit
6308 This limits the size of a table used for sharing information
6309 about collapsible entries among SMP workers. Limiting sharing
6310 too much results in cache content duplication and missed
6311 collapsing opportunities. Using excessively large values
6312 wastes shared memory.
6314 The limit should be significantly larger then the number of
6315 concurrent collapsible entries one wants to share. For a cache
6316 that handles less than 5000 concurrent requests, the default
6317 setting of 16384 should be plenty.
6319 If the limit is set to zero, it disables sharing of collapsed
6320 forwarding between SMP workers.
6325 -----------------------------------------------------------------------------
6328 NAME: forward_timeout
6331 LOC: Config.Timeout.forward
6334 This parameter specifies how long Squid should at most attempt in
6335 finding a forwarding path for the request before giving up.
6338 NAME: connect_timeout
6341 LOC: Config.Timeout.connect
6344 This parameter specifies how long to wait for the TCP connect to
6345 the requested server or peer to complete before Squid should
6346 attempt to find another path where to forward the request.
6349 NAME: peer_connect_timeout
6352 LOC: Config.Timeout.peer_connect
6355 This parameter specifies how long to wait for a pending TCP
6356 connection to a peer cache. The default is 30 seconds. You
6357 may also set different timeout values for individual neighbors
6358 with the 'connect-timeout' option on a 'cache_peer' line.
6364 LOC: Config.Timeout.read
6367 Applied on peer server connections.
6369 After each successful read(), the timeout will be extended by this
6370 amount. If no data is read again after this amount of time,
6371 the request is aborted and logged with ERR_READ_TIMEOUT.
6373 The default is 15 minutes.
6379 LOC: Config.Timeout.write
6382 This timeout is tracked for all connections that have data
6383 available for writing and are waiting for the socket to become
6384 ready. After each successful write, the timeout is extended by
6385 the configured amount. If Squid has data to write but the
6386 connection is not ready for the configured duration, the
6387 transaction associated with the connection is terminated. The
6388 default is 15 minutes.
6391 NAME: request_timeout
6393 LOC: Config.Timeout.request
6396 How long to wait for complete HTTP request headers after initial
6397 connection establishment.
6400 NAME: request_start_timeout
6402 LOC: Config.Timeout.request_start_timeout
6405 How long to wait for the first request byte after initial
6406 connection establishment.
6409 NAME: client_idle_pconn_timeout persistent_request_timeout
6411 LOC: Config.Timeout.clientIdlePconn
6414 How long to wait for the next HTTP request on a persistent
6415 client connection after the previous request completes.
6418 NAME: ftp_client_idle_timeout
6420 LOC: Config.Timeout.ftpClientIdle
6423 How long to wait for an FTP request on a connection to Squid ftp_port.
6424 Many FTP clients do not deal with idle connection closures well,
6425 necessitating a longer default timeout than client_idle_pconn_timeout
6426 used for incoming HTTP requests.
6429 NAME: client_lifetime
6432 LOC: Config.Timeout.lifetime
6435 The maximum amount of time a client (browser) is allowed to
6436 remain connected to the cache process. This protects the Cache
6437 from having a lot of sockets (and hence file descriptors) tied up
6438 in a CLOSE_WAIT state from remote clients that go away without
6439 properly shutting down (either because of a network failure or
6440 because of a poor client implementation). The default is one
6443 NOTE: The default value is intended to be much larger than any
6444 client would ever need to be connected to your cache. You
6445 should probably change client_lifetime only as a last resort.
6446 If you seem to have many client connections tying up
6447 filedescriptors, we recommend first tuning the read_timeout,
6448 request_timeout, persistent_request_timeout and quick_abort values.
6451 NAME: pconn_lifetime
6454 LOC: Config.Timeout.pconnLifetime
6457 Desired maximum lifetime of a persistent connection.
6458 When set, Squid will close a now-idle persistent connection that
6459 exceeded configured lifetime instead of moving the connection into
6460 the idle connection pool (or equivalent). No effect on ongoing/active
6461 transactions. Connection lifetime is the time period from the
6462 connection acceptance or opening time until "now".
6464 This limit is useful in environments with long-lived connections
6465 where Squid configuration or environmental factors change during a
6466 single connection lifetime. If unrestricted, some connections may
6467 last for hours and even days, ignoring those changes that should
6468 have affected their behavior or their existence.
6470 Currently, a new lifetime value supplied via Squid reconfiguration
6471 has no effect on already idle connections unless they become busy.
6473 When set to '0' this limit is not used.
6476 NAME: half_closed_clients
6478 LOC: Config.onoff.half_closed_clients
6481 Some clients may shutdown the sending side of their TCP
6482 connections, while leaving their receiving sides open. Sometimes,
6483 Squid can not tell the difference between a half-closed and a
6484 fully-closed TCP connection.
6486 By default, Squid will immediately close client connections when
6487 read(2) returns "no more data to read."
6489 Change this option to 'on' and Squid will keep open connections
6490 until a read(2) or write(2) on the socket returns an error.
6491 This may show some benefits for reverse proxies. But if not
6492 it is recommended to leave OFF.
6495 NAME: server_idle_pconn_timeout pconn_timeout
6497 LOC: Config.Timeout.serverIdlePconn
6500 Timeout for idle persistent connections to servers and other
6507 LOC: Ident::TheConfig.timeout
6510 Maximum time to wait for IDENT lookups to complete.
6512 If this is too high, and you enabled IDENT lookups from untrusted
6513 users, you might be susceptible to denial-of-service by having
6514 many ident requests going at once.
6517 NAME: shutdown_lifetime
6520 LOC: Config.shutdownLifetime
6523 When SIGTERM or SIGHUP is received, the cache is put into
6524 "shutdown pending" mode until all active sockets are closed.
6525 This value is the lifetime to set for all open descriptors
6526 during shutdown mode. Any active clients after this many
6527 seconds will receive a 'timeout' message.
6531 ADMINISTRATIVE PARAMETERS
6532 -----------------------------------------------------------------------------
6538 LOC: Config.adminEmail
6540 Email-address of local cache manager who will receive
6541 mail if the cache dies. The default is "webmaster".
6547 LOC: Config.EmailFrom
6549 From: email-address for mail sent when the cache dies.
6550 The default is to use 'squid@unique_hostname'.
6552 See also: unique_hostname directive.
6558 LOC: Config.EmailProgram
6560 Email program used to send mail if the cache dies.
6561 The default is "mail". The specified program must comply
6562 with the standard Unix mail syntax:
6563 mail-program recipient < mailfile
6565 Optional command line options can be specified.
6568 NAME: cache_effective_user
6570 DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@
6571 LOC: Config.effectiveUser
6573 If you start Squid as root, it will change its effective/real
6574 UID/GID to the user specified below. The default is to change
6575 to UID of @DEFAULT_CACHE_EFFECTIVE_USER@.
6576 see also; cache_effective_group
6579 NAME: cache_effective_group
6582 DEFAULT_DOC: Use system group memberships of the cache_effective_user account
6583 LOC: Config.effectiveGroup
6585 Squid sets the GID to the effective user's default group ID
6586 (taken from the password file) and supplementary group list
6587 from the groups membership.
6589 If you want Squid to run with a specific GID regardless of
6590 the group memberships of the effective user then set this
6591 to the group (or GID) you want Squid to run as. When set
6592 all other group privileges of the effective user are ignored
6593 and only this GID is effective. If Squid is not started as
6594 root the user starting Squid MUST be member of the specified
6597 This option is not recommended by the Squid Team.
6598 Our preference is for administrators to configure a secure
6599 user account for squid with UID/GID matching system policies.
6602 NAME: httpd_suppress_version_string
6606 LOC: Config.onoff.httpd_suppress_version_string
6608 Suppress Squid version string info in HTTP headers and HTML error pages.
6611 NAME: visible_hostname
6613 LOC: Config.visibleHostname
6615 DEFAULT_DOC: Automatically detect the system host name
6617 If you want to present a special hostname in error messages, etc,
6618 define this. Otherwise, the return value of gethostname()
6619 will be used. If you have multiple caches in a cluster and
6620 get errors about IP-forwarding you must set them to have individual
6621 names with this setting.
6624 NAME: unique_hostname
6626 LOC: Config.uniqueHostname
6628 DEFAULT_DOC: Copy the value from visible_hostname
6630 If you want to have multiple machines with the same
6631 'visible_hostname' you must give each machine a different
6632 'unique_hostname' so forwarding loops can be detected.
6635 NAME: hostname_aliases
6637 LOC: Config.hostnameAliases
6640 A list of other DNS names your cache has.
6648 Minimum umask which should be enforced while the proxy
6649 is running, in addition to the umask set at startup.
6651 For a traditional octal representation of umasks, start
6656 OPTIONS FOR THE CACHE REGISTRATION SERVICE
6657 -----------------------------------------------------------------------------
6659 This section contains parameters for the (optional) cache
6660 announcement service. This service is provided to help
6661 cache administrators locate one another in order to join or
6662 create cache hierarchies.
6664 An 'announcement' message is sent (via UDP) to the registration
6665 service by Squid. By default, the announcement message is NOT
6666 SENT unless you enable it with 'announce_period' below.
6668 The announcement message includes your hostname, plus the
6669 following information from this configuration file:
6675 All current information is processed regularly and made
6676 available on the Web at http://www.ircache.net/Cache/Tracker/.
6679 NAME: announce_period
6681 LOC: Config.Announce.period
6683 DEFAULT_DOC: Announcement messages disabled.
6685 This is how frequently to send cache announcements.
6687 To enable announcing your cache, just set an announce period.
6690 announce_period 1 day
6695 DEFAULT: tracker.ircache.net
6696 LOC: Config.Announce.host
6698 Set the hostname where announce registration messages will be sent.
6700 See also announce_port and announce_file
6706 LOC: Config.Announce.file
6708 The contents of this file will be included in the announce
6709 registration messages.
6715 LOC: Config.Announce.port
6717 Set the port where announce registration messages will be sent.
6719 See also announce_host and announce_file
6723 HTTPD-ACCELERATOR OPTIONS
6724 -----------------------------------------------------------------------------
6727 NAME: httpd_accel_surrogate_id
6730 DEFAULT_DOC: visible_hostname is used if no specific ID is set.
6731 LOC: Config.Accel.surrogate_id
6733 Surrogates (http://www.esi.org/architecture_spec_1.0.html)
6734 need an identification token to allow control targeting. Because
6735 a farm of surrogates may all perform the same tasks, they may share
6736 an identification token.
6739 NAME: http_accel_surrogate_remote
6743 LOC: Config.onoff.surrogate_is_remote
6745 Remote surrogates (such as those in a CDN) honour the header
6746 "Surrogate-Control: no-store-remote".
6748 Set this to on to have squid behave as a remote surrogate.
6752 IFDEF: USE_SQUID_ESI
6753 COMMENT: libxml2|expat|custom
6755 LOC: ESIParser::Type
6758 ESI markup is not strictly XML compatible. The custom ESI parser
6759 will give higher performance, but cannot handle non ASCII character
6764 DELAY POOL PARAMETERS
6765 -----------------------------------------------------------------------------
6769 TYPE: delay_pool_count
6771 IFDEF: USE_DELAY_POOLS
6774 This represents the number of delay pools to be used. For example,
6775 if you have one class 2 delay pool and one class 3 delays pool, you
6776 have a total of 2 delay pools.
6778 See also delay_parameters, delay_class, delay_access for pool
6779 configuration details.
6783 TYPE: delay_pool_class
6785 IFDEF: USE_DELAY_POOLS
6788 This defines the class of each delay pool. There must be exactly one
6789 delay_class line for each delay pool. For example, to define two
6790 delay pools, one of class 2 and one of class 3, the settings above
6794 delay_pools 4 # 4 delay pools
6795 delay_class 1 2 # pool 1 is a class 2 pool
6796 delay_class 2 3 # pool 2 is a class 3 pool
6797 delay_class 3 4 # pool 3 is a class 4 pool
6798 delay_class 4 5 # pool 4 is a class 5 pool
6800 The delay pool classes are:
6802 class 1 Everything is limited by a single aggregate
6805 class 2 Everything is limited by a single aggregate
6806 bucket as well as an "individual" bucket chosen
6807 from bits 25 through 32 of the IPv4 address.
6809 class 3 Everything is limited by a single aggregate
6810 bucket as well as a "network" bucket chosen
6811 from bits 17 through 24 of the IP address and a
6812 "individual" bucket chosen from bits 17 through
6813 32 of the IPv4 address.
6815 class 4 Everything in a class 3 delay pool, with an
6816 additional limit on a per user basis. This
6817 only takes effect if the username is established
6818 in advance - by forcing authentication in your
6821 class 5 Requests are grouped according their tag (see
6822 external_acl's tag= reply).
6825 Each pool also requires a delay_parameters directive to configure the pool size
6826 and speed limits used whenever the pool is applied to a request. Along with
6827 a set of delay_access directives to determine when it is used.
6829 NOTE: If an IP address is a.b.c.d
6830 -> bits 25 through 32 are "d"
6831 -> bits 17 through 24 are "c"
6832 -> bits 17 through 32 are "c * 256 + d"
6834 NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
6835 IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
6837 This clause only supports fast acl types.
6838 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6840 See also delay_parameters and delay_access.
6844 TYPE: delay_pool_access
6846 DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool.
6847 IFDEF: USE_DELAY_POOLS
6850 This is used to determine which delay pool a request falls into.
6852 delay_access is sorted per pool and the matching starts with pool 1,
6853 then pool 2, ..., and finally pool N. The first delay pool where the
6854 request is allowed is selected for the request. If it does not allow
6855 the request to any pool then the request is not delayed (default).
6857 For example, if you want some_big_clients in delay
6858 pool 1 and lotsa_little_clients in delay pool 2:
6860 delay_access 1 allow some_big_clients
6861 delay_access 1 deny all
6862 delay_access 2 allow lotsa_little_clients
6863 delay_access 2 deny all
6864 delay_access 3 allow authenticated_clients
6866 See also delay_parameters and delay_class.
6870 NAME: delay_parameters
6871 TYPE: delay_pool_rates
6873 IFDEF: USE_DELAY_POOLS
6876 This defines the parameters for a delay pool. Each delay pool has
6877 a number of "buckets" associated with it, as explained in the
6878 description of delay_class.
6880 For a class 1 delay pool, the syntax is:
6882 delay_parameters pool aggregate
6884 For a class 2 delay pool:
6886 delay_parameters pool aggregate individual
6888 For a class 3 delay pool:
6890 delay_parameters pool aggregate network individual
6892 For a class 4 delay pool:
6894 delay_parameters pool aggregate network individual user
6896 For a class 5 delay pool:
6898 delay_parameters pool tagrate
6900 The option variables are:
6902 pool a pool number - ie, a number between 1 and the
6903 number specified in delay_pools as used in
6906 aggregate the speed limit parameters for the aggregate bucket
6909 individual the speed limit parameters for the individual
6910 buckets (class 2, 3).
6912 network the speed limit parameters for the network buckets
6915 user the speed limit parameters for the user buckets
6918 tagrate the speed limit parameters for the tag buckets
6921 A pair of delay parameters is written restore/maximum, where restore is
6922 the number of bytes (not bits - modem and network speeds are usually
6923 quoted in bits) per second placed into the bucket, and maximum is the
6924 maximum number of bytes which can be in the bucket at any time.
6926 There must be one delay_parameters line for each delay pool.
6929 For example, if delay pool number 1 is a class 2 delay pool as in the
6930 above example, and is being used to strictly limit each host to 64Kbit/sec
6931 (plus overheads), with no overall limit, the line is:
6933 delay_parameters 1 none 8000/8000
6935 Note that 8 x 8K Byte/sec -> 64K bit/sec.
6937 Note that the word 'none' is used to represent no limit.
6940 And, if delay pool number 2 is a class 3 delay pool as in the above
6941 example, and you want to limit it to a total of 256Kbit/sec (strict limit)
6942 with each 8-bit network permitted 64Kbit/sec (strict limit) and each
6943 individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits
6944 to permit a decent web page to be downloaded at a decent speed
6945 (if the network is not being limited due to overuse) but slow down
6946 large downloads more significantly:
6948 delay_parameters 2 32000/32000 8000/8000 600/8000
6950 Note that 8 x 32K Byte/sec -> 256K bit/sec.
6951 8 x 8K Byte/sec -> 64K bit/sec.
6952 8 x 600 Byte/sec -> 4800 bit/sec.
6955 Finally, for a class 4 delay pool as in the example - each user will
6956 be limited to 128Kbits/sec no matter how many workstations they are logged into.:
6958 delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
6961 See also delay_class and delay_access.
6965 NAME: delay_initial_bucket_level
6966 COMMENT: (percent, 0-100)
6969 IFDEF: USE_DELAY_POOLS
6970 LOC: Config.Delay.initial
6972 The initial bucket percentage is used to determine how much is put
6973 in each bucket when squid starts, is reconfigured, or first notices
6974 a host accessing it (in class 2 and class 3, individual hosts and
6975 networks only have buckets associated with them once they have been
6980 CLIENT DELAY POOL PARAMETERS
6981 -----------------------------------------------------------------------------
6984 NAME: client_delay_pools
6985 TYPE: client_delay_pool_count
6987 IFDEF: USE_DELAY_POOLS
6988 LOC: Config.ClientDelay
6990 This option specifies the number of client delay pools used. It must
6991 preceed other client_delay_* options.
6994 client_delay_pools 2
6996 See also client_delay_parameters and client_delay_access.
6999 NAME: client_delay_initial_bucket_level
7000 COMMENT: (percent, 0-no_limit)
7003 IFDEF: USE_DELAY_POOLS
7004 LOC: Config.ClientDelay.initial
7006 This option determines the initial bucket size as a percentage of
7007 max_bucket_size from client_delay_parameters. Buckets are created
7008 at the time of the "first" connection from the matching IP. Idle
7009 buckets are periodically deleted up.
7011 You can specify more than 100 percent but note that such "oversized"
7012 buckets are not refilled until their size goes down to max_bucket_size
7013 from client_delay_parameters.
7016 client_delay_initial_bucket_level 50
7019 NAME: client_delay_parameters
7020 TYPE: client_delay_pool_rates
7022 IFDEF: USE_DELAY_POOLS
7023 LOC: Config.ClientDelay
7026 This option configures client-side bandwidth limits using the
7029 client_delay_parameters pool speed_limit max_bucket_size
7031 pool is an integer ID used for client_delay_access matching.
7033 speed_limit is bytes added to the bucket per second.
7035 max_bucket_size is the maximum size of a bucket, enforced after any
7036 speed_limit additions.
7038 Please see the delay_parameters option for more information and
7042 client_delay_parameters 1 1024 2048
7043 client_delay_parameters 2 51200 16384
7045 See also client_delay_access.
7049 NAME: client_delay_access
7050 TYPE: client_delay_pool_access
7052 DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool.
7053 IFDEF: USE_DELAY_POOLS
7054 LOC: Config.ClientDelay
7056 This option determines the client-side delay pool for the
7059 client_delay_access pool_ID allow|deny acl_name
7061 All client_delay_access options are checked in their pool ID
7062 order, starting with pool 1. The first checked pool with allowed
7063 request is selected for the request. If no ACL matches or there
7064 are no client_delay_access options, the request bandwidth is not
7067 The ACL-selected pool is then used to find the
7068 client_delay_parameters for the request. Client-side pools are
7069 not used to aggregate clients. Clients are always aggregated
7070 based on their source IP addresses (one bucket per source IP).
7072 This clause only supports fast acl types.
7073 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
7074 Additionally, only the client TCP connection details are available.
7075 ACLs testing HTTP properties will not work.
7077 Please see delay_access for more examples.
7080 client_delay_access 1 allow low_rate_network
7081 client_delay_access 2 allow vips_network
7084 See also client_delay_parameters and client_delay_pools.
7088 WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
7089 -----------------------------------------------------------------------------
7094 LOC: Config.Wccp.router
7096 DEFAULT_DOC: WCCP disabled.
7099 Use this option to define your WCCP ``home'' router for
7102 wccp_router supports a single WCCP(v1) router
7104 wccp2_router supports multiple WCCPv2 routers
7106 only one of the two may be used at the same time and defines
7107 which version of WCCP to use.
7111 TYPE: IpAddress_list
7112 LOC: Config.Wccp2.router
7114 DEFAULT_DOC: WCCPv2 disabled.
7117 Use this option to define your WCCP ``home'' router for
7120 wccp_router supports a single WCCP(v1) router
7122 wccp2_router supports multiple WCCPv2 routers
7124 only one of the two may be used at the same time and defines
7125 which version of WCCP to use.
7130 LOC: Config.Wccp.version
7134 This directive is only relevant if you need to set up WCCP(v1)
7135 to some very old and end-of-life Cisco routers. In all other
7136 setups it must be left unset or at the default setting.
7137 It defines an internal version in the WCCP(v1) protocol,
7138 with version 4 being the officially documented protocol.
7140 According to some users, Cisco IOS 11.2 and earlier only
7141 support WCCP version 3. If you're using that or an earlier
7142 version of IOS, you may need to change this value to 3, otherwise
7143 do not specify this parameter.
7146 NAME: wccp2_rebuild_wait
7148 LOC: Config.Wccp2.rebuildwait
7152 If this is enabled Squid will wait for the cache dir rebuild to finish
7153 before sending the first wccp2 HereIAm packet
7156 NAME: wccp2_forwarding_method
7158 LOC: Config.Wccp2.forwarding_method
7162 WCCP2 allows the setting of forwarding methods between the
7163 router/switch and the cache. Valid values are as follows:
7165 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
7166 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
7168 Currently (as of IOS 12.4) cisco routers only support GRE.
7169 Cisco switches only support the L2 redirect assignment method.
7172 NAME: wccp2_return_method
7174 LOC: Config.Wccp2.return_method
7178 WCCP2 allows the setting of return methods between the
7179 router/switch and the cache for packets that the cache
7180 decides not to handle. Valid values are as follows:
7182 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
7183 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
7185 Currently (as of IOS 12.4) cisco routers only support GRE.
7186 Cisco switches only support the L2 redirect assignment.
7188 If the "ip wccp redirect exclude in" command has been
7189 enabled on the cache interface, then it is still safe for
7190 the proxy server to use a l2 redirect method even if this
7191 option is set to GRE.
7194 NAME: wccp2_assignment_method
7196 LOC: Config.Wccp2.assignment_method
7200 WCCP2 allows the setting of methods to assign the WCCP hash
7201 Valid values are as follows:
7203 hash - Hash assignment
7204 mask - Mask assignment
7206 As a general rule, cisco routers support the hash assignment method
7207 and cisco switches support the mask assignment method.
7212 LOC: Config.Wccp2.info
7213 DEFAULT_IF_NONE: standard 0
7214 DEFAULT_DOC: Use the 'web-cache' standard service.
7217 WCCP2 allows for multiple traffic services. There are two
7218 types: "standard" and "dynamic". The standard type defines
7219 one service id - http (id 0). The dynamic service ids can be from
7220 51 to 255 inclusive. In order to use a dynamic service id
7221 one must define the type of traffic to be redirected; this is done
7222 using the wccp2_service_info option.
7224 The "standard" type does not require a wccp2_service_info option,
7225 just specifying the service id will suffice.
7227 MD5 service authentication can be enabled by adding
7228 "password=<password>" to the end of this service declaration.
7232 wccp2_service standard 0 # for the 'web-cache' standard service
7233 wccp2_service dynamic 80 # a dynamic service type which will be
7234 # fleshed out with subsequent options.
7235 wccp2_service standard 0 password=foo
7238 NAME: wccp2_service_info
7239 TYPE: wccp2_service_info
7240 LOC: Config.Wccp2.info
7244 Dynamic WCCPv2 services require further information to define the
7245 traffic you wish to have diverted.
7249 wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
7250 priority=<priority> ports=<port>,<port>..
7252 The relevant WCCPv2 flags:
7253 + src_ip_hash, dst_ip_hash
7254 + source_port_hash, dst_port_hash
7255 + src_ip_alt_hash, dst_ip_alt_hash
7256 + src_port_alt_hash, dst_port_alt_hash
7259 The port list can be one to eight entries.
7263 wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
7264 priority=240 ports=80
7266 Note: the service id must have been defined by a previous
7267 'wccp2_service dynamic <id>' entry.
7272 LOC: Config.Wccp2.weight
7276 Each cache server gets assigned a set of the destination
7277 hash proportional to their weight.
7282 LOC: Config.Wccp.address
7284 DEFAULT_DOC: Address selected by the operating system.
7287 Use this option if you require WCCPv2 to use a specific
7290 The default behavior is to not bind to any specific address.
7295 LOC: Config.Wccp2.address
7297 DEFAULT_DOC: Address selected by the operating system.
7300 Use this option if you require WCCP to use a specific
7303 The default behavior is to not bind to any specific address.
7307 PERSISTENT CONNECTION HANDLING
7308 -----------------------------------------------------------------------------
7310 Also see "pconn_timeout" in the TIMEOUTS section
7313 NAME: client_persistent_connections
7315 LOC: Config.onoff.client_pconns
7318 Persistent connection support for clients.
7319 Squid uses persistent connections (when allowed). You can use
7320 this option to disable persistent connections with clients.
7323 NAME: server_persistent_connections
7325 LOC: Config.onoff.server_pconns
7328 Persistent connection support for servers.
7329 Squid uses persistent connections (when allowed). You can use
7330 this option to disable persistent connections with servers.
7333 NAME: persistent_connection_after_error
7335 LOC: Config.onoff.error_pconns
7338 With this directive the use of persistent connections after
7339 HTTP errors can be disabled. Useful if you have clients
7340 who fail to handle errors on persistent connections proper.
7343 NAME: detect_broken_pconn
7345 LOC: Config.onoff.detect_broken_server_pconns
7348 Some servers have been found to incorrectly signal the use
7349 of HTTP/1.0 persistent connections even on replies not
7350 compatible, causing significant delays. This server problem
7351 has mostly been seen on redirects.
7353 By enabling this directive Squid attempts to detect such
7354 broken replies and automatically assume the reply is finished
7355 after 10 seconds timeout.
7359 CACHE DIGEST OPTIONS
7360 -----------------------------------------------------------------------------
7363 NAME: digest_generation
7364 IFDEF: USE_CACHE_DIGESTS
7366 LOC: Config.onoff.digest_generation
7369 This controls whether the server will generate a Cache Digest
7370 of its contents. By default, Cache Digest generation is
7371 enabled if Squid is compiled with --enable-cache-digests defined.
7374 NAME: digest_bits_per_entry
7375 IFDEF: USE_CACHE_DIGESTS
7377 LOC: Config.digest.bits_per_entry
7380 This is the number of bits of the server's Cache Digest which
7381 will be associated with the Digest entry for a given HTTP
7382 Method and URL (public key) combination. The default is 5.
7385 NAME: digest_rebuild_period
7386 IFDEF: USE_CACHE_DIGESTS
7389 LOC: Config.digest.rebuild_period
7392 This is the wait time between Cache Digest rebuilds.
7395 NAME: digest_rewrite_period
7397 IFDEF: USE_CACHE_DIGESTS
7399 LOC: Config.digest.rewrite_period
7402 This is the wait time between Cache Digest writes to
7406 NAME: digest_swapout_chunk_size
7409 IFDEF: USE_CACHE_DIGESTS
7410 LOC: Config.digest.swapout_chunk_size
7413 This is the number of bytes of the Cache Digest to write to
7414 disk at a time. It defaults to 4096 bytes (4KB), the Squid
7418 NAME: digest_rebuild_chunk_percentage
7419 COMMENT: (percent, 0-100)
7420 IFDEF: USE_CACHE_DIGESTS
7422 LOC: Config.digest.rebuild_chunk_percentage
7425 This is the percentage of the Cache Digest to be scanned at a
7426 time. By default it is set to 10% of the Cache Digest.
7431 -----------------------------------------------------------------------------
7436 LOC: Config.Port.snmp
7438 DEFAULT_DOC: SNMP disabled.
7441 The port number where Squid listens for SNMP requests. To enable
7442 SNMP support set this to a suitable port number. Port number
7443 3401 is often used for the Squid SNMP agent. By default it's
7444 set to "0" (disabled)
7452 LOC: Config.accessList.snmp
7454 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
7457 Allowing or denying access to the SNMP port.
7459 All access to the agent is denied by default.
7462 snmp_access allow|deny [!]aclname ...
7464 This clause only supports fast acl types.
7465 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
7468 snmp_access allow snmppublic localhost
7469 snmp_access deny all
7472 NAME: snmp_incoming_address
7474 LOC: Config.Addrs.snmp_incoming
7476 DEFAULT_DOC: Accept SNMP packets from all machine interfaces.
7479 Just like 'udp_incoming_address', but for the SNMP port.
7481 snmp_incoming_address is used for the SNMP socket receiving
7482 messages from SNMP agents.
7484 The default snmp_incoming_address is to listen on all
7485 available network interfaces.
7488 NAME: snmp_outgoing_address
7490 LOC: Config.Addrs.snmp_outgoing
7492 DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system.
7495 Just like 'udp_outgoing_address', but for the SNMP port.
7497 snmp_outgoing_address is used for SNMP packets returned to SNMP
7500 If snmp_outgoing_address is not set it will use the same socket
7501 as snmp_incoming_address. Only change this if you want to have
7502 SNMP replies sent using another address than where this Squid
7503 listens for SNMP queries.
7505 NOTE, snmp_incoming_address and snmp_outgoing_address can not have
7506 the same value since they both use the same port.
7511 -----------------------------------------------------------------------------
7514 NAME: icp_port udp_port
7517 DEFAULT_DOC: ICP disabled.
7518 LOC: Config.Port.icp
7520 The port number where Squid sends and receives ICP queries to
7521 and from neighbor caches. The standard UDP port for ICP is 3130.
7524 icp_port @DEFAULT_ICP_PORT@
7531 DEFAULT_DOC: HTCP disabled.
7532 LOC: Config.Port.htcp
7534 The port number where Squid sends and receives HTCP queries to
7535 and from neighbor caches. To turn it on you want to set it to
7542 NAME: log_icp_queries
7546 LOC: Config.onoff.log_udp
7548 If set, ICP queries are logged to access.log. You may wish
7549 do disable this if your ICP load is VERY high to speed things
7550 up or to simplify log analysis.
7553 NAME: udp_incoming_address
7555 LOC:Config.Addrs.udp_incoming
7557 DEFAULT_DOC: Accept packets from all machine interfaces.
7559 udp_incoming_address is used for UDP packets received from other
7562 The default behavior is to not bind to any specific address.
7564 Only change this if you want to have all UDP queries received on
7565 a specific interface/address.
7567 NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
7568 modules. Altering it will affect all of them in the same manner.
7570 see also; udp_outgoing_address
7572 NOTE, udp_incoming_address and udp_outgoing_address can not
7573 have the same value since they both use the same port.
7576 NAME: udp_outgoing_address
7578 LOC: Config.Addrs.udp_outgoing
7580 DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system.
7582 udp_outgoing_address is used for UDP packets sent out to other
7585 The default behavior is to not bind to any specific address.
7587 Instead it will use the same socket as udp_incoming_address.
7588 Only change this if you want to have UDP queries sent using another
7589 address than where this Squid listens for UDP queries from other
7592 NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
7593 modules. Altering it will affect all of them in the same manner.
7595 see also; udp_incoming_address
7597 NOTE, udp_incoming_address and udp_outgoing_address can not
7598 have the same value since they both use the same port.
7605 LOC: Config.onoff.icp_hit_stale
7607 If you want to return ICP_HIT for stale cache objects, set this
7608 option to 'on'. If you have sibling relationships with caches
7609 in other administrative domains, this should be 'off'. If you only
7610 have sibling relationships with caches under your control,
7611 it is probably okay to set this to 'on'.
7612 If set to 'on', your siblings should use the option "allow-miss"
7613 on their cache_peer lines for connecting to you.
7616 NAME: minimum_direct_hops
7619 LOC: Config.minDirectHops
7621 If using the ICMP pinging stuff, do direct fetches for sites
7622 which are no more than this many hops away.
7625 NAME: minimum_direct_rtt
7629 LOC: Config.minDirectRtt
7631 If using the ICMP pinging stuff, do direct fetches for sites
7632 which are no more than this many rtt milliseconds away.
7638 LOC: Config.Netdb.low
7640 The low water mark for the ICMP measurement database.
7642 Note: high watermark controlled by netdb_high directive.
7644 These watermarks are counts, not percents. The defaults are
7645 (low) 900 and (high) 1000. When the high water mark is
7646 reached, database entries will be deleted until the low
7653 LOC: Config.Netdb.high
7655 The high water mark for the ICMP measurement database.
7657 Note: low watermark controlled by netdb_low directive.
7659 These watermarks are counts, not percents. The defaults are
7660 (low) 900 and (high) 1000. When the high water mark is
7661 reached, database entries will be deleted until the low
7665 NAME: netdb_ping_period
7667 LOC: Config.Netdb.period
7670 The minimum period for measuring a site. There will be at
7671 least this much delay between successive pings to the same
7672 network. The default is five minutes.
7679 LOC: Config.onoff.query_icmp
7681 If you want to ask your peers to include ICMP data in their ICP
7682 replies, enable this option.
7684 If your peer has configured Squid (during compilation) with
7685 '--enable-icmp' that peer will send ICMP pings to origin server
7686 sites of the URLs it receives. If you enable this option the
7687 ICP replies from that peer will include the ICMP data (if available).
7688 Then, when choosing a parent cache, Squid will choose the parent with
7689 the minimal RTT to the origin server. When this happens, the
7690 hierarchy field of the access.log will be
7691 "CLOSEST_PARENT_MISS". This option is off by default.
7694 NAME: test_reachability
7698 LOC: Config.onoff.test_reachability
7700 When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
7701 instead of ICP_MISS if the target host is NOT in the ICMP
7702 database, or has a zero RTT.
7705 NAME: icp_query_timeout
7708 DEFAULT_DOC: Dynamic detection.
7710 LOC: Config.Timeout.icp_query
7712 Normally Squid will automatically determine an optimal ICP
7713 query timeout value based on the round-trip-time of recent ICP
7714 queries. If you want to override the value determined by
7715 Squid, set this 'icp_query_timeout' to a non-zero value. This
7716 value is specified in MILLISECONDS, so, to use a 2-second
7717 timeout (the old default), you would write:
7719 icp_query_timeout 2000
7722 NAME: maximum_icp_query_timeout
7726 LOC: Config.Timeout.icp_query_max
7728 Normally the ICP query timeout is determined dynamically. But
7729 sometimes it can lead to very large values (say 5 seconds).
7730 Use this option to put an upper limit on the dynamic timeout
7731 value. Do NOT use this option to always use a fixed (instead
7732 of a dynamic) timeout value. To set a fixed timeout see the
7733 'icp_query_timeout' directive.
7736 NAME: minimum_icp_query_timeout
7740 LOC: Config.Timeout.icp_query_min
7742 Normally the ICP query timeout is determined dynamically. But
7743 sometimes it can lead to very small timeouts, even lower than
7744 the normal latency variance on your link due to traffic.
7745 Use this option to put an lower limit on the dynamic timeout
7746 value. Do NOT use this option to always use a fixed (instead
7747 of a dynamic) timeout value. To set a fixed timeout see the
7748 'icp_query_timeout' directive.
7751 NAME: background_ping_rate
7755 LOC: Config.backgroundPingRate
7757 Controls how often the ICP pings are sent to siblings that
7758 have background-ping set.
7762 MULTICAST ICP OPTIONS
7763 -----------------------------------------------------------------------------
7768 LOC: Config.mcast_group_list
7771 This tag specifies a list of multicast groups which your server
7772 should join to receive multicasted ICP queries.
7774 NOTE! Be very careful what you put here! Be sure you
7775 understand the difference between an ICP _query_ and an ICP
7776 _reply_. This option is to be set only if you want to RECEIVE
7777 multicast queries. Do NOT set this option to SEND multicast
7778 ICP (use cache_peer for that). ICP replies are always sent via
7779 unicast, so this option does not affect whether or not you will
7780 receive replies from multicast group members.
7782 You must be very careful to NOT use a multicast address which
7783 is already in use by another group of caches.
7785 If you are unsure about multicast, please read the Multicast
7786 chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
7788 Usage: mcast_groups 239.128.16.128 224.0.1.20
7790 By default, Squid doesn't listen on any multicast groups.
7793 NAME: mcast_miss_addr
7794 IFDEF: MULTICAST_MISS_STREAM
7796 LOC: Config.mcast_miss.addr
7798 DEFAULT_DOC: disabled.
7800 If you enable this option, every "cache miss" URL will
7801 be sent out on the specified multicast address.
7803 Do not enable this option unless you are are absolutely
7804 certain you understand what you are doing.
7807 NAME: mcast_miss_ttl
7808 IFDEF: MULTICAST_MISS_STREAM
7810 LOC: Config.mcast_miss.ttl
7813 This is the time-to-live value for packets multicasted
7814 when multicasting off cache miss URLs is enabled. By
7815 default this is set to 'site scope', i.e. 16.
7818 NAME: mcast_miss_port
7819 IFDEF: MULTICAST_MISS_STREAM
7821 LOC: Config.mcast_miss.port
7824 This is the port number to be used in conjunction with
7828 NAME: mcast_miss_encode_key
7829 IFDEF: MULTICAST_MISS_STREAM
7831 LOC: Config.mcast_miss.encode_key
7832 DEFAULT: XXXXXXXXXXXXXXXX
7834 The URLs that are sent in the multicast miss stream are
7835 encrypted. This is the encryption key.
7838 NAME: mcast_icp_query_timeout
7842 LOC: Config.Timeout.mcast_icp_query
7844 For multicast peers, Squid regularly sends out ICP "probes" to
7845 count how many other peers are listening on the given multicast
7846 address. This value specifies how long Squid should wait to
7847 count all the replies. The default is 2000 msec, or 2
7852 INTERNAL ICON OPTIONS
7853 -----------------------------------------------------------------------------
7856 NAME: icon_directory
7858 LOC: Config.icons.directory
7859 DEFAULT: @DEFAULT_ICON_DIR@
7861 Where the icons are stored. These are normally kept in
7865 NAME: global_internal_static
7867 LOC: Config.onoff.global_internal_static
7870 This directive controls is Squid should intercept all requests for
7871 /squid-internal-static/ no matter which host the URL is requesting
7872 (default on setting), or if nothing special should be done for
7873 such URLs (off setting). The purpose of this directive is to make
7874 icons etc work better in complex cache hierarchies where it may
7875 not always be possible for all corners in the cache mesh to reach
7876 the server generating a directory listing.
7879 NAME: short_icon_urls
7881 LOC: Config.icons.use_short_names
7884 If this is enabled Squid will use short URLs for icons.
7885 If disabled it will revert to the old behavior of including
7886 it's own name and port in the URL.
7888 If you run a complex cache hierarchy with a mix of Squid and
7889 other proxies you may need to disable this directive.
7894 -----------------------------------------------------------------------------
7897 NAME: error_directory
7899 LOC: Config.errorDirectory
7901 DEFAULT_DOC: Send error pages in the clients preferred language
7903 If you wish to create your own versions of the default
7904 error files to customize them to suit your company copy
7905 the error/template files to another directory and point
7908 WARNING: This option will disable multi-language support
7909 on error pages if used.
7911 The squid developers are interested in making squid available in
7912 a wide variety of languages. If you are making translations for a
7913 language that Squid does not currently provide please consider
7914 contributing your translation back to the project.
7915 http://wiki.squid-cache.org/Translations
7917 The squid developers working on translations are happy to supply drop-in
7918 translated error files in exchange for any new language contributions.
7921 NAME: error_default_language
7922 IFDEF: USE_ERR_LOCALES
7924 LOC: Config.errorDefaultLanguage
7926 DEFAULT_DOC: Generate English language pages.
7928 Set the default language which squid will send error pages in
7929 if no existing translation matches the clients language
7932 If unset (default) generic English will be used.
7934 The squid developers are interested in making squid available in
7935 a wide variety of languages. If you are interested in making
7936 translations for any language see the squid wiki for details.
7937 http://wiki.squid-cache.org/Translations
7940 NAME: error_log_languages
7941 IFDEF: USE_ERR_LOCALES
7943 LOC: Config.errorLogMissingLanguages
7946 Log to cache.log what languages users are attempting to
7947 auto-negotiate for translations.
7949 Successful negotiations are not logged. Only failures
7950 have meaning to indicate that Squid may need an upgrade
7951 of its error page translations.
7954 NAME: err_page_stylesheet
7956 LOC: Config.errorStylesheet
7957 DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css
7959 CSS Stylesheet to pattern the display of Squid default error pages.
7961 For information on CSS see http://www.w3.org/Style/CSS/
7966 LOC: Config.errHtmlText
7969 HTML text to include in error messages. Make this a "mailto"
7970 URL to your admin address, or maybe just a link to your
7971 organizations Web page.
7973 To include this in your error messages, you must rewrite
7974 the error template files (found in the "errors" directory).
7975 Wherever you want the 'err_html_text' line to appear,
7976 insert a %L tag in the error template file.
7979 NAME: email_err_data
7982 LOC: Config.onoff.emailErrData
7985 If enabled, information about the occurred error will be
7986 included in the mailto links of the ERR pages (if %W is set)
7987 so that the email body contains the data.
7988 Syntax is <A HREF="mailto:%w%W">%w</A>
7993 LOC: Config.denyInfoList
7996 Usage: deny_info err_page_name acl
7997 or deny_info http://... acl
7998 or deny_info TCP_RESET acl
8000 This can be used to return a ERR_ page for requests which
8001 do not pass the 'http_access' rules. Squid remembers the last
8002 acl it evaluated in http_access, and if a 'deny_info' line exists
8003 for that ACL Squid returns a corresponding error page.
8005 The acl is typically the last acl on the http_access deny line which
8006 denied access. The exceptions to this rule are:
8007 - When Squid needs to request authentication credentials. It's then
8008 the first authentication related acl encountered
8009 - When none of the http_access lines matches. It's then the last
8010 acl processed on the last http_access line.
8011 - When the decision to deny access was made by an adaptation service,
8012 the acl name is the corresponding eCAP or ICAP service_name.
8014 NP: If providing your own custom error pages with error_directory
8015 you may also specify them by your custom file name:
8016 Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
8018 By defaut Squid will send "403 Forbidden". A different 4xx or 5xx
8019 may be specified by prefixing the file name with the code and a colon.
8020 e.g. 404:ERR_CUSTOM_ACCESS_DENIED
8022 Alternatively you can tell Squid to reset the TCP connection
8023 by specifying TCP_RESET.
8025 Or you can specify an error URL or URL pattern. The browsers will
8026 get redirected to the specified URL after formatting tags have
8027 been replaced. Redirect will be done with 302 or 307 according to
8028 HTTP/1.1 specs. A different 3xx code may be specified by prefixing
8029 the URL. e.g. 303:http://example.com/
8032 %a - username (if available. Password NOT included)
8035 %E - Error description
8037 %H - Request domain name
8038 %i - Client IP Address
8040 %O - Unescaped message result from external ACL helper
8041 %o - Message result from external ACL helper
8042 %p - Request Port number
8043 %P - Request Protocol name
8044 %R - Request URL path
8045 %T - Timestamp in RFC 1123 format
8046 %U - Full canonical URL from client
8047 (HTTPS URLs terminate with *)
8048 %u - Full canonical URL from client
8049 %w - Admin email from squid.conf
8051 %% - Literal percent (%) code
8056 OPTIONS INFLUENCING REQUEST FORWARDING
8057 -----------------------------------------------------------------------------
8060 NAME: nonhierarchical_direct
8062 LOC: Config.onoff.nonhierarchical_direct
8065 By default, Squid will send any non-hierarchical requests
8066 (not cacheable request type) direct to origin servers.
8068 When this is set to "off", Squid will prefer to send these
8069 requests to parents.
8071 Note that in most configurations, by turning this off you will only
8072 add latency to these request without any improvement in global hit
8075 This option only sets a preference. If the parent is unavailable a
8076 direct connection to the origin server may still be attempted. To
8077 completely prevent direct connections use never_direct.
8082 LOC: Config.onoff.prefer_direct
8085 Normally Squid tries to use parents for most requests. If you for some
8086 reason like it to first try going direct and only use a parent if
8087 going direct fails set this to on.
8089 By combining nonhierarchical_direct off and prefer_direct on you
8090 can set up Squid to use a parent as a backup path if going direct
8093 Note: If you want Squid to use parents for all requests see
8094 the never_direct directive. prefer_direct only modifies how Squid
8095 acts on cacheable requests.
8098 NAME: cache_miss_revalidate
8102 LOC: Config.onoff.cache_miss_revalidate
8104 RFC 7232 defines a conditional request mechanism to prevent
8105 response objects being unnecessarily transferred over the network.
8106 If that mechanism is used by the client and a cache MISS occurs
8107 it can prevent new cache entries being created.
8109 This option determines whether Squid on cache MISS will pass the
8110 client revalidation request to the server or tries to fetch new
8111 content for caching. It can be useful while the cache is mostly
8112 empty to more quickly have the cache populated by generating
8113 non-conditional GETs.
8115 When set to 'on' (default), Squid will pass all client If-* headers
8116 to the server. This permits server responses without a cacheable
8117 payload to be delivered and on MISS no new cache entry is created.
8119 When set to 'off' and if the request is cacheable, Squid will
8120 remove the clients If-Modified-Since and If-None-Match headers from
8121 the request sent to the server. This requests a 200 status response
8122 from the server to create a new cache entry with.
8127 LOC: Config.accessList.AlwaysDirect
8129 DEFAULT_DOC: Prevent any cache_peer being used for this request.
8131 Usage: always_direct allow|deny [!]aclname ...
8133 Here you can use ACL elements to specify requests which should
8134 ALWAYS be forwarded by Squid to the origin servers without using
8135 any peers. For example, to always directly forward requests for
8136 local servers ignoring any parents or siblings you may have use
8139 acl local-servers dstdomain my.domain.net
8140 always_direct allow local-servers
8142 To always forward FTP requests directly, use
8145 always_direct allow FTP
8147 NOTE: There is a similar, but opposite option named
8148 'never_direct'. You need to be aware that "always_direct deny
8149 foo" is NOT the same thing as "never_direct allow foo". You
8150 may need to use a deny rule to exclude a more-specific case of
8151 some other rule. Example:
8153 acl local-external dstdomain external.foo.net
8154 acl local-servers dstdomain .foo.net
8155 always_direct deny local-external
8156 always_direct allow local-servers
8158 NOTE: If your goal is to make the client forward the request
8159 directly to the origin server bypassing Squid then this needs
8160 to be done in the client configuration. Squid configuration
8161 can only tell Squid how Squid should fetch the object.
8163 NOTE: This directive is not related to caching. The replies
8164 is cached as usual even if you use always_direct. To not cache
8165 the replies see the 'cache' directive.
8167 This clause supports both fast and slow acl types.
8168 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8173 LOC: Config.accessList.NeverDirect
8175 DEFAULT_DOC: Allow DNS results to be used for this request.
8177 Usage: never_direct allow|deny [!]aclname ...
8179 never_direct is the opposite of always_direct. Please read
8180 the description for always_direct if you have not already.
8182 With 'never_direct' you can use ACL elements to specify
8183 requests which should NEVER be forwarded directly to origin
8184 servers. For example, to force the use of a proxy for all
8185 requests, except those in your local domain use something like:
8187 acl local-servers dstdomain .foo.net
8188 never_direct deny local-servers
8189 never_direct allow all
8191 or if Squid is inside a firewall and there are local intranet
8192 servers inside the firewall use something like:
8194 acl local-intranet dstdomain .foo.net
8195 acl local-external dstdomain external.foo.net
8196 always_direct deny local-external
8197 always_direct allow local-intranet
8198 never_direct allow all
8200 This clause supports both fast and slow acl types.
8201 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8205 ADVANCED NETWORKING OPTIONS
8206 -----------------------------------------------------------------------------
8209 NAME: incoming_udp_average incoming_icp_average
8212 LOC: Config.comm_incoming.udp.average
8214 Heavy voodoo here. I can't even believe you are reading this.
8215 Are you crazy? Don't even think about adjusting these unless
8216 you understand the algorithms in comm_select.c first!
8219 NAME: incoming_tcp_average incoming_http_average
8222 LOC: Config.comm_incoming.tcp.average
8224 Heavy voodoo here. I can't even believe you are reading this.
8225 Are you crazy? Don't even think about adjusting these unless
8226 you understand the algorithms in comm_select.c first!
8229 NAME: incoming_dns_average
8232 LOC: Config.comm_incoming.dns.average
8234 Heavy voodoo here. I can't even believe you are reading this.
8235 Are you crazy? Don't even think about adjusting these unless
8236 you understand the algorithms in comm_select.c first!
8239 NAME: min_udp_poll_cnt min_icp_poll_cnt
8242 LOC: Config.comm_incoming.udp.min_poll
8244 Heavy voodoo here. I can't even believe you are reading this.
8245 Are you crazy? Don't even think about adjusting these unless
8246 you understand the algorithms in comm_select.c first!
8249 NAME: min_dns_poll_cnt
8252 LOC: Config.comm_incoming.dns.min_poll
8254 Heavy voodoo here. I can't even believe you are reading this.
8255 Are you crazy? Don't even think about adjusting these unless
8256 you understand the algorithms in comm_select.c first!
8259 NAME: min_tcp_poll_cnt min_http_poll_cnt
8262 LOC: Config.comm_incoming.tcp.min_poll
8264 Heavy voodoo here. I can't even believe you are reading this.
8265 Are you crazy? Don't even think about adjusting these unless
8266 you understand the algorithms in comm_select.c first!
8272 LOC: Config.accept_filter
8276 The name of an accept(2) filter to install on Squid's
8277 listen socket(s). This feature is perhaps specific to
8278 FreeBSD and requires support in the kernel.
8280 The 'httpready' filter delays delivering new connections
8281 to Squid until a full HTTP request has been received.
8282 See the accf_http(9) man page for details.
8284 The 'dataready' filter delays delivering new connections
8285 to Squid until there is some data to process.
8286 See the accf_dataready(9) man page for details.
8290 The 'data' filter delays delivering of new connections
8291 to Squid until there is some data to process by TCP_ACCEPT_DEFER.
8292 You may optionally specify a number of seconds to wait by
8293 'data=N' where N is the number of seconds. Defaults to 30
8294 if not specified. See the tcp(7) man page for details.
8297 accept_filter httpready
8302 NAME: client_ip_max_connections
8304 LOC: Config.client_ip_max_connections
8306 DEFAULT_DOC: No limit.
8308 Set an absolute limit on the number of connections a single
8309 client IP can use. Any more than this and Squid will begin to drop
8310 new connections from the client until it closes some links.
8312 Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP
8313 connections from the client. For finer control use the ACL access controls.
8315 Requires client_db to be enabled (the default).
8317 WARNING: This may noticably slow down traffic received via external proxies
8318 or NAT devices and cause them to rebound error messages back to their clients.
8321 NAME: tcp_recv_bufsize
8325 DEFAULT_DOC: Use operating system TCP defaults.
8326 LOC: Config.tcpRcvBufsz
8328 Size of receive buffer to set for TCP sockets. Probably just
8329 as easy to change your kernel's default.
8330 Omit from squid.conf to use the default buffer size.
8335 -----------------------------------------------------------------------------
8342 LOC: Adaptation::Icap::TheConfig.onoff
8345 If you want to enable the ICAP module support, set this to on.
8348 NAME: icap_connect_timeout
8351 LOC: Adaptation::Icap::TheConfig.connect_timeout_raw
8354 This parameter specifies how long to wait for the TCP connect to
8355 the requested ICAP server to complete before giving up and either
8356 terminating the HTTP transaction or bypassing the failure.
8358 The default for optional services is peer_connect_timeout.
8359 The default for essential services is connect_timeout.
8360 If this option is explicitly set, its value applies to all services.
8363 NAME: icap_io_timeout
8367 DEFAULT_DOC: Use read_timeout.
8368 LOC: Adaptation::Icap::TheConfig.io_timeout_raw
8371 This parameter specifies how long to wait for an I/O activity on
8372 an established, active ICAP connection before giving up and
8373 either terminating the HTTP transaction or bypassing the
8377 NAME: icap_service_failure_limit
8378 COMMENT: limit [in memory-depth time-units]
8379 TYPE: icap_service_failure_limit
8381 LOC: Adaptation::Icap::TheConfig
8384 The limit specifies the number of failures that Squid tolerates
8385 when establishing a new TCP connection with an ICAP service. If
8386 the number of failures exceeds the limit, the ICAP service is
8387 not used for new ICAP requests until it is time to refresh its
8390 A negative value disables the limit. Without the limit, an ICAP
8391 service will not be considered down due to connectivity failures
8392 between ICAP OPTIONS requests.
8394 Squid forgets ICAP service failures older than the specified
8395 value of memory-depth. The memory fading algorithm
8396 is approximate because Squid does not remember individual
8397 errors but groups them instead, splitting the option
8398 value into ten time slots of equal length.
8400 When memory-depth is 0 and by default this option has no
8401 effect on service failure expiration.
8403 Squid always forgets failures when updating service settings
8404 using an ICAP OPTIONS transaction, regardless of this option
8408 # suspend service usage after 10 failures in 5 seconds:
8409 icap_service_failure_limit 10 in 5 seconds
8412 NAME: icap_service_revival_delay
8415 LOC: Adaptation::Icap::TheConfig.service_revival_delay
8418 The delay specifies the number of seconds to wait after an ICAP
8419 OPTIONS request failure before requesting the options again. The
8420 failed ICAP service is considered "down" until fresh OPTIONS are
8423 The actual delay cannot be smaller than the hardcoded minimum
8424 delay of 30 seconds.
8427 NAME: icap_preview_enable
8431 LOC: Adaptation::Icap::TheConfig.preview_enable
8434 The ICAP Preview feature allows the ICAP server to handle the
8435 HTTP message by looking only at the beginning of the message body
8436 or even without receiving the body at all. In some environments,
8437 previews greatly speedup ICAP processing.
8439 During an ICAP OPTIONS transaction, the server may tell Squid what
8440 HTTP messages should be previewed and how big the preview should be.
8441 Squid will not use Preview if the server did not request one.
8443 To disable ICAP Preview for all ICAP services, regardless of
8444 individual ICAP server OPTIONS responses, set this option to "off".
8446 icap_preview_enable off
8449 NAME: icap_preview_size
8452 LOC: Adaptation::Icap::TheConfig.preview_size
8454 DEFAULT_DOC: No preview sent.
8456 The default size of preview data to be sent to the ICAP server.
8457 This value might be overwritten on a per server basis by OPTIONS requests.
8460 NAME: icap_206_enable
8464 LOC: Adaptation::Icap::TheConfig.allow206_enable
8467 206 (Partial Content) responses is an ICAP extension that allows the
8468 ICAP agents to optionally combine adapted and original HTTP message
8469 content. The decision to combine is postponed until the end of the
8470 ICAP response. Squid supports Partial Content extension by default.
8472 Activation of the Partial Content extension is negotiated with each
8473 ICAP service during OPTIONS exchange. Most ICAP servers should handle
8474 negotation correctly even if they do not support the extension, but
8475 some might fail. To disable Partial Content support for all ICAP
8476 services and to avoid any negotiation, set this option to "off".
8482 NAME: icap_default_options_ttl
8485 LOC: Adaptation::Icap::TheConfig.default_options_ttl
8488 The default TTL value for ICAP OPTIONS responses that don't have
8489 an Options-TTL header.
8492 NAME: icap_persistent_connections
8496 LOC: Adaptation::Icap::TheConfig.reuse_connections
8499 Whether or not Squid should use persistent connections to
8503 NAME: adaptation_send_client_ip icap_send_client_ip
8505 IFDEF: USE_ADAPTATION
8507 LOC: Adaptation::Config::send_client_ip
8510 If enabled, Squid shares HTTP client IP information with adaptation
8511 services. For ICAP, Squid adds the X-Client-IP header to ICAP requests.
8512 For eCAP, Squid sets the libecap::metaClientIp transaction option.
8514 See also: adaptation_uses_indirect_client
8517 NAME: adaptation_send_username icap_send_client_username
8519 IFDEF: USE_ADAPTATION
8521 LOC: Adaptation::Config::send_username
8524 This sends authenticated HTTP client username (if available) to
8525 the adaptation service.
8527 For ICAP, the username value is encoded based on the
8528 icap_client_username_encode option and is sent using the header
8529 specified by the icap_client_username_header option.
8532 NAME: icap_client_username_header
8535 LOC: Adaptation::Icap::TheConfig.client_username_header
8536 DEFAULT: X-Client-Username
8538 ICAP request header name to use for adaptation_send_username.
8541 NAME: icap_client_username_encode
8545 LOC: Adaptation::Icap::TheConfig.client_username_encode
8548 Whether to base64 encode the authenticated client username.
8552 TYPE: icap_service_type
8554 LOC: Adaptation::Icap::TheConfig
8557 Defines a single ICAP service using the following format:
8559 icap_service id vectoring_point uri [option ...]
8562 an opaque identifier or name which is used to direct traffic to
8563 this specific service. Must be unique among all adaptation
8564 services in squid.conf.
8566 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
8567 This specifies at which point of transaction processing the
8568 ICAP service should be activated. *_postcache vectoring points
8569 are not yet supported.
8571 uri: icap://servername:port/servicepath
8572 ICAP server and service location.
8573 icaps://servername:port/servicepath
8574 The "icap:" URI scheme is used for traditional ICAP server and
8575 service location (default port is 1344, connections are not
8576 encrypted). The "icaps:" URI scheme is for Secure ICAP
8577 services that use SSL/TLS-encrypted ICAP connections (by
8578 default, on port 11344).
8580 ICAP does not allow a single service to handle both REQMOD and RESPMOD
8581 transactions. Squid does not enforce that requirement. You can specify
8582 services with the same service_url and different vectoring_points. You
8583 can even specify multiple identical services as long as their
8584 service_names differ.
8586 To activate a service, use the adaptation_access directive. To group
8587 services, use adaptation_service_chain and adaptation_service_set.
8589 Service options are separated by white space. ICAP services support
8590 the following name=value options:
8593 If set to 'on' or '1', the ICAP service is treated as
8594 optional. If the service cannot be reached or malfunctions,
8595 Squid will try to ignore any errors and process the message as
8596 if the service was not enabled. No all ICAP errors can be
8597 bypassed. If set to 0, the ICAP service is treated as
8598 essential and all ICAP errors will result in an error page
8599 returned to the HTTP client.
8601 Bypass is off by default: services are treated as essential.
8604 If set to 'on' or '1', the ICAP service is allowed to
8605 dynamically change the current message adaptation plan by
8606 returning a chain of services to be used next. The services
8607 are specified using the X-Next-Services ICAP response header
8608 value, formatted as a comma-separated list of service names.
8609 Each named service should be configured in squid.conf. Other
8610 services are ignored. An empty X-Next-Services value results
8611 in an empty plan which ends the current adaptation.
8613 Dynamic adaptation plan may cross or cover multiple supported
8614 vectoring points in their natural processing order.
8616 Routing is not allowed by default: the ICAP X-Next-Services
8617 response header is ignored.
8620 Only has effect on split-stack systems. The default on those systems
8621 is to use IPv4-only connections. When set to 'on' this option will
8622 make Squid use IPv6-only connections to contact this ICAP service.
8624 on-overload=block|bypass|wait|force
8625 If the service Max-Connections limit has been reached, do
8626 one of the following for each new ICAP transaction:
8627 * block: send an HTTP error response to the client
8628 * bypass: ignore the "over-connected" ICAP service
8629 * wait: wait (in a FIFO queue) for an ICAP connection slot
8630 * force: proceed, ignoring the Max-Connections limit
8632 In SMP mode with N workers, each worker assumes the service
8633 connection limit is Max-Connections/N, even though not all
8634 workers may use a given service.
8636 The default value is "bypass" if service is bypassable,
8637 otherwise it is set to "wait".
8641 Use the given number as the Max-Connections limit, regardless
8642 of the Max-Connections value given by the service, if any.
8644 connection-encryption=on|off
8645 Determines the ICAP service effect on the connections_encrypted
8648 The default is "on" for Secure ICAP services (i.e., those
8649 with the icaps:// service URIs scheme) and "off" for plain ICAP
8652 Does not affect ICAP connections (e.g., does not turn Secure
8655 ==== ICAPS / TLS OPTIONS ====
8657 These options are used for Secure ICAP (icaps://....) services only.
8659 tls-cert=/path/to/ssl/certificate
8660 A client SSL certificate to use when connecting to
8663 tls-key=/path/to/ssl/key
8664 The private TLS/SSL key corresponding to sslcert above.
8665 If 'tls-key' is not specified 'tls-cert' is assumed to
8666 reference a combined PEM format file containing both the
8667 certificate and the key.
8669 tls-cipher=... The list of valid TLS/SSL ciphers to use when connecting
8670 to this icap server.
8673 The minimum TLS protocol version to permit. To control
8674 SSLv3 use the ssloptions= parameter.
8675 Supported Values: 1.0 (default), 1.1, 1.2
8677 tls-options=... Specify various OpenSSL library options:
8679 NO_SSLv3 Disallow the use of SSLv3
8681 NO_TLSv1 Disallow the use of TLSv1.0
8682 NO_TLSv1_1 Disallow the use of TLSv1.1
8683 NO_TLSv1_2 Disallow the use of TLSv1.2
8686 Always create a new key when using
8687 temporary/ephemeral DH key exchanges
8689 ALL Enable various bug workarounds
8690 suggested as "harmless" by OpenSSL
8691 Be warned that this reduces SSL/TLS
8692 strength to some attacks.
8694 See the OpenSSL SSL_CTX_set_options documentation for a
8695 more complete list. Options relevant only to SSLv2 are
8698 tls-cafile= PEM file containing CA certificates to use when verifying
8699 the icap server certificate.
8700 Use to specify intermediate CA certificate(s) if not sent
8701 by the server. Or the full CA chain for the server when
8702 using the tls-default-ca=off flag.
8703 May be repeated to load multiple files.
8705 tls-capath=... A directory containing additional CA certificates to
8706 use when verifying the icap server certificate.
8707 Requires OpenSSL or LibreSSL.
8709 tls-crlfile=... A certificate revocation list file to use when
8710 verifying the icap server certificate.
8712 tls-flags=... Specify various flags modifying the Squid TLS implementation:
8715 Accept certificates even if they fail to
8718 Don't verify the icap server certificate
8719 matches the server name
8721 tls-default-ca[=off]
8722 Whether to use the system Trusted CAs. Default is ON.
8724 tls-domain= The icap server name as advertised in it's certificate.
8725 Used for verifying the correctness of the received icap
8726 server certificate. If not specified the icap server
8727 hostname extracted from ICAP URI will be used.
8729 Older icap_service format without optional named parameters is
8730 deprecated but supported for backward compatibility.
8733 icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0
8734 icap_service svcLogger reqmod_precache icaps://icap2.mydomain.net:11344/reqmod routing=on
8738 TYPE: icap_class_type
8743 This deprecated option was documented to define an ICAP service
8744 chain, even though it actually defined a set of similar, redundant
8745 services, and the chains were not supported.
8747 To define a set of redundant services, please use the
8748 adaptation_service_set directive. For service chains, use
8749 adaptation_service_chain.
8753 TYPE: icap_access_type
8758 This option is deprecated. Please use adaptation_access, which
8759 has the same ICAP functionality, but comes with better
8760 documentation, and eCAP support.
8765 -----------------------------------------------------------------------------
8772 LOC: Adaptation::Ecap::TheConfig.onoff
8775 Controls whether eCAP support is enabled.
8779 TYPE: ecap_service_type
8781 LOC: Adaptation::Ecap::TheConfig
8784 Defines a single eCAP service
8786 ecap_service id vectoring_point uri [option ...]
8789 an opaque identifier or name which is used to direct traffic to
8790 this specific service. Must be unique among all adaptation
8791 services in squid.conf.
8793 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
8794 This specifies at which point of transaction processing the
8795 eCAP service should be activated. *_postcache vectoring points
8796 are not yet supported.
8798 uri: ecap://vendor/service_name?custom&cgi=style¶meters=optional
8799 Squid uses the eCAP service URI to match this configuration
8800 line with one of the dynamically loaded services. Each loaded
8801 eCAP service must have a unique URI. Obtain the right URI from
8802 the service provider.
8804 To activate a service, use the adaptation_access directive. To group
8805 services, use adaptation_service_chain and adaptation_service_set.
8807 Service options are separated by white space. eCAP services support
8808 the following name=value options:
8811 If set to 'on' or '1', the eCAP service is treated as optional.
8812 If the service cannot be reached or malfunctions, Squid will try
8813 to ignore any errors and process the message as if the service
8814 was not enabled. No all eCAP errors can be bypassed.
8815 If set to 'off' or '0', the eCAP service is treated as essential
8816 and all eCAP errors will result in an error page returned to the
8819 Bypass is off by default: services are treated as essential.
8822 If set to 'on' or '1', the eCAP service is allowed to
8823 dynamically change the current message adaptation plan by
8824 returning a chain of services to be used next.
8826 Dynamic adaptation plan may cross or cover multiple supported
8827 vectoring points in their natural processing order.
8829 Routing is not allowed by default.
8831 connection-encryption=on|off
8832 Determines the eCAP service effect on the connections_encrypted
8835 Defaults to "on", which does not taint the master transaction
8838 Does not affect eCAP API calls.
8840 Older ecap_service format without optional named parameters is
8841 deprecated but supported for backward compatibility.
8845 ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off
8846 ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on
8849 NAME: loadable_modules
8851 IFDEF: USE_LOADABLE_MODULES
8852 LOC: Config.loadable_module_names
8855 Instructs Squid to load the specified dynamic module(s) or activate
8856 preloaded module(s).
8858 loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so
8862 MESSAGE ADAPTATION OPTIONS
8863 -----------------------------------------------------------------------------
8866 NAME: adaptation_service_set
8867 TYPE: adaptation_service_set_type
8868 IFDEF: USE_ADAPTATION
8873 Configures an ordered set of similar, redundant services. This is
8874 useful when hot standby or backup adaptation servers are available.
8876 adaptation_service_set set_name service_name1 service_name2 ...
8878 The named services are used in the set declaration order. The first
8879 applicable adaptation service from the set is used first. The next
8880 applicable service is tried if and only if the transaction with the
8881 previous service fails and the message waiting to be adapted is still
8884 When adaptation starts, broken services are ignored as if they were
8885 not a part of the set. A broken service is a down optional service.
8887 The services in a set must be attached to the same vectoring point
8888 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
8890 If all services in a set are optional then adaptation failures are
8891 bypassable. If all services in the set are essential, then a
8892 transaction failure with one service may still be retried using
8893 another service from the set, but when all services fail, the master
8894 transaction fails as well.
8896 A set may contain a mix of optional and essential services, but that
8897 is likely to lead to surprising results because broken services become
8898 ignored (see above), making previously bypassable failures fatal.
8899 Technically, it is the bypassability of the last failed service that
8902 See also: adaptation_access adaptation_service_chain
8905 adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
8906 adaptation service_set svcLogger loggerLocal loggerRemote
8909 NAME: adaptation_service_chain
8910 TYPE: adaptation_service_chain_type
8911 IFDEF: USE_ADAPTATION
8916 Configures a list of complementary services that will be applied
8917 one-by-one, forming an adaptation chain or pipeline. This is useful
8918 when Squid must perform different adaptations on the same message.
8920 adaptation_service_chain chain_name service_name1 svc_name2 ...
8922 The named services are used in the chain declaration order. The first
8923 applicable adaptation service from the chain is used first. The next
8924 applicable service is applied to the successful adaptation results of
8925 the previous service in the chain.
8927 When adaptation starts, broken services are ignored as if they were
8928 not a part of the chain. A broken service is a down optional service.
8930 Request satisfaction terminates the adaptation chain because Squid
8931 does not currently allow declaration of RESPMOD services at the
8932 "reqmod_precache" vectoring point (see icap_service or ecap_service).
8934 The services in a chain must be attached to the same vectoring point
8935 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
8937 A chain may contain a mix of optional and essential services. If an
8938 essential adaptation fails (or the failure cannot be bypassed for
8939 other reasons), the master transaction fails. Otherwise, the failure
8940 is bypassed as if the failed adaptation service was not in the chain.
8942 See also: adaptation_access adaptation_service_set
8945 adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
8948 NAME: adaptation_access
8949 TYPE: adaptation_access_type
8950 IFDEF: USE_ADAPTATION
8953 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
8955 Sends an HTTP transaction to an ICAP or eCAP adaptation service.
8957 adaptation_access service_name allow|deny [!]aclname...
8958 adaptation_access set_name allow|deny [!]aclname...
8960 At each supported vectoring point, the adaptation_access
8961 statements are processed in the order they appear in this
8962 configuration file. Statements pointing to the following services
8963 are ignored (i.e., skipped without checking their ACL):
8965 - services serving different vectoring points
8966 - "broken-but-bypassable" services
8967 - "up" services configured to ignore such transactions
8968 (e.g., based on the ICAP Transfer-Ignore header).
8970 When a set_name is used, all services in the set are checked
8971 using the same rules, to find the first applicable one. See
8972 adaptation_service_set for details.
8974 If an access list is checked and there is a match, the
8975 processing stops: For an "allow" rule, the corresponding
8976 adaptation service is used for the transaction. For a "deny"
8977 rule, no adaptation service is activated.
8979 It is currently not possible to apply more than one adaptation
8980 service at the same vectoring point to the same HTTP transaction.
8982 See also: icap_service and ecap_service
8985 adaptation_access service_1 allow all
8988 NAME: adaptation_service_iteration_limit
8990 IFDEF: USE_ADAPTATION
8991 LOC: Adaptation::Config::service_iteration_limit
8994 Limits the number of iterations allowed when applying adaptation
8995 services to a message. If your longest adaptation set or chain
8996 may have more than 16 services, increase the limit beyond its
8997 default value of 16. If detecting infinite iteration loops sooner
8998 is critical, make the iteration limit match the actual number
8999 of services in your longest adaptation set or chain.
9001 Infinite adaptation loops are most likely with routing services.
9003 See also: icap_service routing=1
9006 NAME: adaptation_masterx_shared_names
9008 IFDEF: USE_ADAPTATION
9009 LOC: Adaptation::Config::masterx_shared_name
9012 For each master transaction (i.e., the HTTP request and response
9013 sequence, including all related ICAP and eCAP exchanges), Squid
9014 maintains a table of metadata. The table entries are (name, value)
9015 pairs shared among eCAP and ICAP exchanges. The table is destroyed
9016 with the master transaction.
9018 This option specifies the table entry names that Squid must accept
9019 from and forward to the adaptation transactions.
9021 An ICAP REQMOD or RESPMOD transaction may set an entry in the
9022 shared table by returning an ICAP header field with a name
9023 specified in adaptation_masterx_shared_names.
9025 An eCAP REQMOD or RESPMOD transaction may set an entry in the
9026 shared table by implementing the libecap::visitEachOption() API
9027 to provide an option with a name specified in
9028 adaptation_masterx_shared_names.
9030 Squid will store and forward the set entry to subsequent adaptation
9031 transactions within the same master transaction scope.
9033 Only one shared entry name is supported at this time.
9036 # share authentication information among ICAP services
9037 adaptation_masterx_shared_names X-Subscriber-ID
9040 NAME: adaptation_meta
9042 IFDEF: USE_ADAPTATION
9043 LOC: Adaptation::Config::metaHeaders
9046 This option allows Squid administrator to add custom ICAP request
9047 headers or eCAP options to Squid ICAP requests or eCAP transactions.
9048 Use it to pass custom authentication tokens and other
9049 transaction-state related meta information to an ICAP/eCAP service.
9051 The addition of a meta header is ACL-driven:
9052 adaptation_meta name value [!]aclname ...
9054 Processing for a given header name stops after the first ACL list match.
9055 Thus, it is impossible to add two headers with the same name. If no ACL
9056 lists match for a given header name, no such header is added. For
9059 # do not debug transactions except for those that need debugging
9060 adaptation_meta X-Debug 1 needs_debugging
9062 # log all transactions except for those that must remain secret
9063 adaptation_meta X-Log 1 !keep_secret
9065 # mark transactions from users in the "G 1" group
9066 adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1
9068 The "value" parameter may be a regular squid.conf token or a "double
9069 quoted string". Within the quoted string, use backslash (\) to escape
9070 any character, which is currently only useful for escaping backslashes
9071 and double quotes. For example,
9072 "this string has one backslash (\\) and two \"quotes\""
9074 Used adaptation_meta header values may be logged via %note
9075 logformat code. If multiple adaptation_meta headers with the same name
9076 are used during master transaction lifetime, the header values are
9077 logged in the order they were used and duplicate values are ignored
9078 (only the first repeated value will be logged).
9084 LOC: Adaptation::Icap::TheConfig.repeat
9085 DEFAULT_IF_NONE: deny all
9087 This ACL determines which retriable ICAP transactions are
9088 retried. Transactions that received a complete ICAP response
9089 and did not have to consume or produce HTTP bodies to receive
9090 that response are usually retriable.
9092 icap_retry allow|deny [!]aclname ...
9094 Squid automatically retries some ICAP I/O timeouts and errors
9095 due to persistent connection race conditions.
9097 See also: icap_retry_limit
9100 NAME: icap_retry_limit
9103 LOC: Adaptation::Icap::TheConfig.repeat_limit
9105 DEFAULT_DOC: No retries are allowed.
9107 Limits the number of retries allowed.
9109 Communication errors due to persistent connection race
9110 conditions are unavoidable, automatically retried, and do not
9111 count against this limit.
9113 See also: icap_retry
9119 -----------------------------------------------------------------------------
9122 NAME: check_hostnames
9125 LOC: Config.onoff.check_hostnames
9127 For security and stability reasons Squid can check
9128 hostnames for Internet standard RFC compliance. If you want
9129 Squid to perform these checks turn this directive on.
9132 NAME: allow_underscore
9135 LOC: Config.onoff.allow_underscore
9137 Underscore characters is not strictly allowed in Internet hostnames
9138 but nevertheless used by many sites. Set this to off if you want
9139 Squid to be strict about the standard.
9140 This check is performed only when check_hostnames is set to on.
9143 NAME: dns_retransmit_interval
9146 LOC: Config.Timeout.idns_retransmit
9148 Initial retransmit interval for DNS queries. The interval is
9149 doubled each time all configured DNS servers have been tried.
9155 LOC: Config.Timeout.idns_query
9157 DNS Query timeout. If no response is received to a DNS query
9158 within this time all DNS servers for the queried domain
9159 are assumed to be unavailable.
9162 NAME: dns_packet_max
9164 DEFAULT_DOC: EDNS disabled
9166 LOC: Config.dns.packet_max
9168 Maximum number of bytes packet size to advertise via EDNS.
9169 Set to "none" to disable EDNS large packet support.
9171 For legacy reasons DNS UDP replies will default to 512 bytes which
9172 is too small for many responses. EDNS provides a means for Squid to
9173 negotiate receiving larger responses back immediately without having
9174 to failover with repeat requests. Responses larger than this limit
9175 will retain the old behaviour of failover to TCP DNS.
9177 Squid has no real fixed limit internally, but allowing packet sizes
9178 over 1500 bytes requires network jumbogram support and is usually not
9181 WARNING: The RFC also indicates that some older resolvers will reply
9182 with failure of the whole request if the extension is added. Some
9183 resolvers have already been identified which will reply with mangled
9184 EDNS response on occasion. Usually in response to many-KB jumbogram
9185 sizes being advertised by Squid.
9186 Squid will currently treat these both as an unable-to-resolve domain
9187 even if it would be resolvable without EDNS.
9194 DEFAULT_DOC: Search for single-label domain names is disabled.
9195 LOC: Config.onoff.res_defnames
9197 Normally the RES_DEFNAMES resolver option is disabled
9198 (see res_init(3)). This prevents caches in a hierarchy
9199 from interpreting single-component hostnames locally. To allow
9200 Squid to handle single-component names, enable this option.
9203 NAME: dns_multicast_local
9207 DEFAULT_DOC: Search for .local and .arpa names is disabled.
9208 LOC: Config.onoff.dns_mdns
9210 When set to on, Squid sends multicast DNS lookups on the local
9211 network for domains ending in .local and .arpa.
9212 This enables local servers and devices to be contacted in an
9213 ad-hoc or zero-configuration network environment.
9216 NAME: dns_nameservers
9219 DEFAULT_DOC: Use operating system definitions
9220 LOC: Config.dns_nameservers
9222 Use this if you want to specify a list of DNS name servers
9223 (IP addresses) to use instead of those given in your
9224 /etc/resolv.conf file.
9226 On Windows platforms, if no value is specified here or in
9227 the /etc/resolv.conf file, the list of DNS name servers are
9228 taken from the Windows registry, both static and dynamic DHCP
9229 configurations are supported.
9231 Example: dns_nameservers 10.0.0.1 192.172.0.4
9236 DEFAULT: @DEFAULT_HOSTS@
9237 LOC: Config.etcHostsPath
9239 Location of the host-local IP name-address associations
9240 database. Most Operating Systems have such a file on different
9242 - Un*X & Linux: /etc/hosts
9243 - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
9244 (%SystemRoot% value install default is c:\winnt)
9245 - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
9246 (%SystemRoot% value install default is c:\windows)
9247 - Windows 9x/Me: %windir%\hosts
9248 (%windir% value is usually c:\windows)
9249 - Cygwin: /etc/hosts
9251 The file contains newline-separated definitions, in the
9252 form ip_address_in_dotted_form name [name ...] names are
9253 whitespace-separated. Lines beginning with an hash (#)
9254 character are comments.
9256 The file is checked at startup and upon configuration.
9257 If set to 'none', it won't be checked.
9258 If append_domain is used, that domain will be added to
9259 domain-local (i.e. not containing any dot character) host
9265 LOC: Config.appendDomain
9267 DEFAULT_DOC: Use operating system definitions
9269 Appends local domain name to hostnames without any dots in
9270 them. append_domain must begin with a period.
9272 Be warned there are now Internet names with no dots in
9273 them using only top-domain names, so setting this may
9274 cause some Internet sites to become unavailable.
9277 append_domain .yourdomain.com
9280 NAME: ignore_unknown_nameservers
9282 LOC: Config.onoff.ignore_unknown_nameservers
9285 By default Squid checks that DNS responses are received
9286 from the same IP addresses they are sent to. If they
9287 don't match, Squid ignores the response and writes a warning
9288 message to cache.log. You can allow responses from unknown
9289 nameservers by setting this option to 'off'.
9295 LOC: Config.dns.v4_first
9297 With the IPv6 Internet being as fast or faster than IPv4 Internet
9298 for most networks Squid prefers to contact websites over IPv6.
9300 This option reverses the order of preference to make Squid contact
9301 dual-stack websites over IPv4 first. Squid will still perform both
9302 IPv6 and IPv4 DNS lookups before connecting.
9305 This option will restrict the situations under which IPv6
9306 connectivity is used (and tested). Hiding network problems
9307 which would otherwise be detected and warned about.
9311 COMMENT: (number of entries)
9314 LOC: Config.ipcache.size
9316 Maximum number of DNS IP cache entries.
9323 LOC: Config.ipcache.low
9330 LOC: Config.ipcache.high
9332 The size, low-, and high-water marks for the IP cache.
9335 NAME: fqdncache_size
9336 COMMENT: (number of entries)
9339 LOC: Config.fqdncache.size
9341 Maximum number of FQDN cache entries.
9346 -----------------------------------------------------------------------------
9349 NAME: configuration_includes_quoted_values
9351 TYPE: configuration_includes_quoted_values
9353 LOC: ConfigParser::RecognizeQuotedValues
9355 If set, Squid will recognize each "quoted string" after a configuration
9356 directive as a single parameter. The quotes are stripped before the
9357 parameter value is interpreted or used.
9358 See "Values with spaces, quotes, and other special characters"
9359 section for more details.
9366 LOC: Config.onoff.mem_pools
9368 If set, Squid will keep pools of allocated (but unused) memory
9369 available for future use. If memory is a premium on your
9370 system and you believe your malloc library outperforms Squid
9371 routines, disable this.
9374 NAME: memory_pools_limit
9378 LOC: Config.MemPools.limit
9380 Used only with memory_pools on:
9381 memory_pools_limit 50 MB
9383 If set to a non-zero value, Squid will keep at most the specified
9384 limit of allocated (but unused) memory in memory pools. All free()
9385 requests that exceed this limit will be handled by your malloc
9386 library. Squid does not pre-allocate any memory, just safe-keeps
9387 objects that otherwise would be free()d. Thus, it is safe to set
9388 memory_pools_limit to a reasonably high value even if your
9389 configuration will use less memory.
9391 If set to none, Squid will keep all memory it can. That is, there
9392 will be no limit on the total amount of memory used for safe-keeping.
9394 To disable memory allocation optimization, do not set
9395 memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
9397 An overhead for maintaining memory pools is not taken into account
9398 when the limit is checked. This overhead is close to four bytes per
9399 object kept. However, pools may actually _save_ memory because of
9400 reduced memory thrashing in your malloc library.
9404 COMMENT: on|off|transparent|truncate|delete
9407 LOC: opt_forwarded_for
9409 If set to "on", Squid will append your client's IP address
9410 in the HTTP requests it forwards. By default it looks like:
9412 X-Forwarded-For: 192.1.2.3
9414 If set to "off", it will appear as
9416 X-Forwarded-For: unknown
9418 If set to "transparent", Squid will not alter the
9419 X-Forwarded-For header in any way.
9421 If set to "delete", Squid will delete the entire
9422 X-Forwarded-For header.
9424 If set to "truncate", Squid will remove all existing
9425 X-Forwarded-For entries, and place the client IP as the sole entry.
9428 NAME: cachemgr_passwd
9429 TYPE: cachemgrpasswd
9431 DEFAULT_DOC: No password. Actions which require password are denied.
9432 LOC: Config.passwd_list
9434 Specify passwords for cachemgr operations.
9436 Usage: cachemgr_passwd password action action ...
9438 Some valid actions are (see cache manager menu for a full list):
9478 * Indicates actions which will not be performed without a
9479 valid password, others can be performed if not listed here.
9481 To disable an action, set the password to "disable".
9482 To allow performing an action without a password, set the
9485 Use the keyword "all" to set the same password for all actions.
9488 cachemgr_passwd secret shutdown
9489 cachemgr_passwd lesssssssecret info stats/objects
9490 cachemgr_passwd disable all
9497 LOC: Config.onoff.client_db
9499 If you want to disable collecting per-client statistics,
9500 turn off client_db here.
9503 NAME: refresh_all_ims
9507 LOC: Config.onoff.refresh_all_ims
9509 When you enable this option, squid will always check
9510 the origin server for an update when a client sends an
9511 If-Modified-Since request. Many browsers use IMS
9512 requests when the user requests a reload, and this
9513 ensures those clients receive the latest version.
9515 By default (off), squid may return a Not Modified response
9516 based on the age of the cached version.
9519 NAME: reload_into_ims
9520 IFDEF: USE_HTTP_VIOLATIONS
9524 LOC: Config.onoff.reload_into_ims
9526 When you enable this option, client no-cache or ``reload''
9527 requests will be changed to If-Modified-Since requests.
9528 Doing this VIOLATES the HTTP standard. Enabling this
9529 feature could make you liable for problems which it
9532 see also refresh_pattern for a more selective approach.
9535 NAME: connect_retries
9537 LOC: Config.connect_retries
9539 DEFAULT_DOC: Do not retry failed connections.
9541 This sets the maximum number of connection attempts made for each
9542 TCP connection. The connect_retries attempts must all still
9543 complete within the connection timeout period.
9545 The default is not to re-try if the first connection attempt fails.
9546 The (not recommended) maximum is 10 tries.
9548 A warning message will be generated if it is set to a too-high
9549 value and the configured value will be over-ridden.
9551 Note: These re-tries are in addition to forward_max_tries
9552 which limit how many different addresses may be tried to find
9556 NAME: retry_on_error
9558 LOC: Config.retry.onerror
9561 If set to ON Squid will automatically retry requests when
9562 receiving an error response with status 403 (Forbidden),
9563 500 (Internal Error), 501 or 503 (Service not available).
9564 Status 502 and 504 (Gateway errors) are always retried.
9566 This is mainly useful if you are in a complex cache hierarchy to
9567 work around access control errors.
9569 NOTE: This retry will attempt to find another working destination.
9570 Which is different from the server which just failed.
9573 NAME: as_whois_server
9575 LOC: Config.as_whois_server
9576 DEFAULT: whois.ra.net
9578 WHOIS server to query for AS numbers. NOTE: AS numbers are
9579 queried only when Squid starts up, not for every request.
9584 LOC: Config.onoff.offline
9587 Enable this option and Squid will never try to validate cached
9591 NAME: uri_whitespace
9592 TYPE: uri_whitespace
9593 LOC: Config.uri_whitespace
9596 What to do with requests that have whitespace characters in the
9599 strip: The whitespace characters are stripped out of the URL.
9600 This is the behavior recommended by RFC2396 and RFC3986
9601 for tolerant handling of generic URI.
9602 NOTE: This is one difference between generic URI and HTTP URLs.
9604 deny: The request is denied. The user receives an "Invalid
9606 This is the behaviour recommended by RFC2616 for safe
9607 handling of HTTP request URL.
9609 allow: The request is allowed and the URI is not changed. The
9610 whitespace characters remain in the URI. Note the
9611 whitespace is passed to redirector processes if they
9613 Note this may be considered a violation of RFC2616
9614 request parsing where whitespace is prohibited in the
9617 encode: The request is allowed and the whitespace characters are
9618 encoded according to RFC1738.
9620 chop: The request is allowed and the URI is chopped at the
9624 NOTE the current Squid implementation of encode and chop violates
9625 RFC2616 by not using a 301 redirect after altering the URL.
9630 LOC: Config.chroot_dir
9633 Specifies a directory where Squid should do a chroot() while
9634 initializing. This also causes Squid to fully drop root
9635 privileges after initializing. This means, for example, if you
9636 use a HTTP port less than 1024 and try to reconfigure, you may
9637 get an error saying that Squid can not open the port.
9640 NAME: balance_on_multiple_ip
9642 LOC: Config.onoff.balance_on_multiple_ip
9645 Modern IP resolvers in squid sort lookup results by preferred access.
9646 By default squid will use these IP in order and only rotates to
9647 the next listed when the most preffered fails.
9649 Some load balancing servers based on round robin DNS have been
9650 found not to preserve user session state across requests
9651 to different IP addresses.
9653 Enabling this directive Squid rotates IP's per request.
9656 NAME: pipeline_prefetch
9657 TYPE: pipelinePrefetch
9658 LOC: Config.pipeline_max_prefetch
9660 DEFAULT_DOC: Do not pre-parse pipelined requests.
9662 HTTP clients may send a pipeline of 1+N requests to Squid using a
9663 single connection, without waiting for Squid to respond to the first
9664 of those requests. This option limits the number of concurrent
9665 requests Squid will try to handle in parallel. If set to N, Squid
9666 will try to receive and process up to 1+N requests on the same
9667 connection concurrently.
9669 Defaults to 0 (off) for bandwidth management and access logging
9672 NOTE: pipelining requires persistent connections to clients.
9674 WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication.
9677 NAME: high_response_time_warning
9680 LOC: Config.warnings.high_rptm
9682 DEFAULT_DOC: disabled.
9684 If the one-minute median response time exceeds this value,
9685 Squid prints a WARNING with debug level 0 to get the
9686 administrators attention. The value is in milliseconds.
9689 NAME: high_page_fault_warning
9691 LOC: Config.warnings.high_pf
9693 DEFAULT_DOC: disabled.
9695 If the one-minute average page fault rate exceeds this
9696 value, Squid prints a WARNING with debug level 0 to get
9697 the administrators attention. The value is in page faults
9701 NAME: high_memory_warning
9703 LOC: Config.warnings.high_memory
9704 IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H
9706 DEFAULT_DOC: disabled.
9708 If the memory usage (as determined by gnumalloc, if available and used)
9709 exceeds this amount, Squid prints a WARNING with debug level 0 to get
9710 the administrators attention.
9712 # TODO: link high_memory_warning to mempools?
9714 NAME: sleep_after_fork
9715 COMMENT: (microseconds)
9717 LOC: Config.sleep_after_fork
9720 When this is set to a non-zero value, the main Squid process
9721 sleeps the specified number of microseconds after a fork()
9722 system call. This sleep may help the situation where your
9723 system reports fork() failures due to lack of (virtual)
9724 memory. Note, however, if you have a lot of child
9725 processes, these sleep delays will add up and your
9726 Squid will not service requests for some amount of time
9727 until all the child processes have been started.
9728 On Windows value less then 1000 (1 milliseconds) are
9732 NAME: windows_ipaddrchangemonitor
9733 IFDEF: _SQUID_WINDOWS_
9737 LOC: Config.onoff.WIN32_IpAddrChangeMonitor
9739 On Windows Squid by default will monitor IP address changes and will
9740 reconfigure itself after any detected event. This is very useful for
9741 proxies connected to internet with dial-up interfaces.
9742 In some cases (a Proxy server acting as VPN gateway is one) it could be
9743 desiderable to disable this behaviour setting this to 'off'.
9744 Note: after changing this, Squid service must be restarted.
9749 IFDEF: USE_SQUID_EUI
9751 LOC: Eui::TheConfig.euiLookup
9753 Whether to lookup the EUI or MAC address of a connected client.
9756 NAME: max_filedescriptors max_filedesc
9759 DEFAULT_DOC: Use operating system limits set by ulimit.
9760 LOC: Config.max_filedescriptors
9762 Reduce the maximum number of filedescriptors supported below
9763 the usual operating system defaults.
9765 Remove from squid.conf to inherit the current ulimit setting.
9767 Note: Changing this requires a restart of Squid. Also
9768 not all I/O types supports large values (eg on Windows).
9771 NAME: force_request_body_continuation
9773 LOC: Config.accessList.forceRequestBodyContinuation
9775 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
9777 This option controls how Squid handles data upload requests from HTTP
9778 and FTP agents that require a "Please Continue" control message response
9779 to actually send the request body to Squid. It is mostly useful in
9780 adaptation environments.
9782 When Squid receives an HTTP request with an "Expect: 100-continue"
9783 header or an FTP upload command (e.g., STOR), Squid normally sends the
9784 request headers or FTP command information to an adaptation service (or
9785 peer) and waits for a response. Most adaptation services (and some
9786 broken peers) may not respond to Squid at that stage because they may
9787 decide to wait for the HTTP request body or FTP data transfer. However,
9788 that request body or data transfer may never come because Squid has not
9789 responded with the HTTP 100 or FTP 150 (Please Continue) control message
9790 to the request sender yet!
9792 An allow match tells Squid to respond with the HTTP 100 or FTP 150
9793 (Please Continue) control message on its own, before forwarding the
9794 request to an adaptation service or peer. Such a response usually forces
9795 the request sender to proceed with sending the body. A deny match tells
9796 Squid to delay that control response until the origin server confirms
9797 that the request body is needed. Delaying is the default behavior.
9800 NAME: server_pconn_for_nonretriable
9803 DEFAULT_DOC: Open new connections for forwarding requests Squid cannot retry safely.
9804 LOC: Config.accessList.serverPconnForNonretriable
9806 This option provides fine-grained control over persistent connection
9807 reuse when forwarding HTTP requests that Squid cannot retry. It is useful
9808 in environments where opening new connections is very expensive
9809 (e.g., all connections are secured with TLS with complex client and server
9810 certificate validation) and race conditions associated with persistent
9811 connections are very rare and/or only cause minor problems.
9813 HTTP prohibits retrying unsafe and non-idempotent requests (e.g., POST).
9814 Squid limitations also prohibit retrying all requests with bodies (e.g., PUT).
9815 By default, when forwarding such "risky" requests, Squid opens a new
9816 connection to the server or cache_peer, even if there is an idle persistent
9817 connection available. When Squid is configured to risk sending a non-retriable
9818 request on a previously used persistent connection, and the server closes
9819 the connection before seeing that risky request, the user gets an error response
9820 from Squid. In most cases, that error response will be HTTP 502 (Bad Gateway)
9821 with ERR_ZERO_SIZE_OBJECT or ERR_WRITE_ERROR (peer connection reset) error detail.
9823 If an allow rule matches, Squid reuses an available idle persistent connection
9824 (if any) for the request that Squid cannot retry. If a deny rule matches, then
9825 Squid opens a new connection for the request that Squid cannot retry.
9827 This option does not affect requests that Squid can retry. They will reuse idle
9828 persistent connections (if any).
9830 This clause only supports fast acl types.
9831 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
9834 acl SpeedIsWorthTheRisk method POST
9835 server_pconn_for_nonretriable allow SpeedIsWorthTheRisk