
164
Appendix D
Configuration Files
Example
The following rule configures Traffic Server to never cache FTP documents requested from the IP address
112.12.12.12.
dest_ip=112.12.12.12 scheme=ftp action=never-cache
The following rule configures Traffic Server to keep documents with URLs that contain the regular expression
politics
and with the path prefix
/viewpoint
in the cache for 12 hours.
url_regex=politics prefix=/viewpoint pin-in-cache=12h
The following rules configures Traffic Server to revalidate
gif
and
jpeg
objects in the domain
hp.com
every
6 hours and all other objects in
hp.com
every hour.
dest_domain=hp.com suffix=gif revalidate=6h
dest_domain=hp.com suffix=jpeg revalidate=6h
dest_domain=hp.com revalidate=6h
filter.config
The
filter.config
file lets you deny or allow particular URL requests and keep or strip header information.
Allowing a URL request means that the Traffic Server will cache and serve the requested document. When a
request is denied, the client receives an
access denied
message.
Format
Each line in the
filter.config
file contains a filtering rule. Traffic Server recognizes three space-delimited
tags:
primary destination=value secondary specifier=value action=value
The following table lists the possible primary destinations and their allowed values:
The secondary specifiers are optional in the
filter.config
file in the Traffic Server’s
config
directory.
The following table lists the possible secondary specifiers and their allowed values.
NOTE
The rules are applied in the order listed.
IMPORTANT
After you modify the
filter.config
file, Traffic Manager has to reread the
configuration files. Run the
traffic_line -x
command. If you are running a cluster,
you need only run the command for one node; the changes will propagate.
NOTE
You can use more than one secondary specifier in a rule. However, you cannot repeat a
secondary specifier.
Primary Destination
Allowed Value
dest_domain
Requested domain name
dest_host
Requested hostname
dest_ip
Requested IP address
url_regex
Regular expression to be found in a URL