![]()
Squid Proxy Server 3.1 Beginner's Guide
Table of Contents
Squid Proxy Server 3.1 Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action - heading
What just happened?
Pop quiz
Have a go hero - heading
Reader feedback
Customer support
Errata
Piracy
Questions
1. Getting Started with Squid
Proxy server
Reverse proxy
Getting Squid
Time for action โ identifying the right version
What just happened?
Methods of obtaining Squid
Using source archives
Time for action โ downloading Squid
What just happened?
Obtaining the latest source code from Bazaar VCS
Time for action โ using Bazaar to obtain source code
What just happened?
Have a go hero โ fetching the source code
Using binary packages
Installing Squid
Installing Squid from source code
Compiling Squid
Why compile?
Uncompressing the source archive
Configure or system check
--prefix
--enable-gnuregex
--disable-inline
--disable-optimizations
--enable-storeio
--enable-removal-policies
--enable-icmp
--enable-delay-pools
--enable-esi
--enable-useragent-log
--enable-referer-log
--disable-wccp
--disable-wccpv2
--disable-snmp
--enable-cachemgr-hostname
--enable-arp-acl
--disable-htcp
--enable-ssl
--enable-cache-digests
--enable-default-err-language
--enable-err-languages
--disable-http-violations
--enable-ipfw-transparent
--enable-ipf-transparent
--enable-pf-transparent
--enable-linux-netfliter
--enable-follow-x-forwarded-for
--disable-ident-lookups
--disable-internal-dns
--enable-default-hostsfile
--enable-auth
Old Syntax
New Syntax
--enable-auth-basic
--enable-auth-ntlm
--enable-auth-negotiate
--enable-auth-digest
--enable-ntlm-fail-open
--enable-external-acl-helpers
--disable-translation
--disable-auto-locale
--disable-unlinkd
--with-default-user
--with-logdir
--with-pidfile
--with-aufs-threads
--without-pthreads
--with-openssl
--with-large-files
--with-filedescriptors
Have a go hero โ file descriptors
Time for action โ running the configure command
What just happened?
Have a go hero โ debugging configure errors
Time for action โ compiling the source
What just happened?
Time for action โ installing Squid
What just happened?
Time for action โ exploring Squid files
bin
bin/squidclient
etc
etc/squid.conf
etc/squid.conf.default
etc/squid.conf.documented
libexec
libexec/cachemgr.cgi
sbin
sbin/squid
share
share/errors
share/icons
share/man
var
var/cache
var/logs
What just happened?
Installing Squid from binary packages
Fedora, CentOS or Red Hat
Debian or Ubuntu
FreeBSD
OpenBSD or NetBSD
Dragonfly BSD
Gentoo
Arch Linux
Pop quiz
Summary
2. Configuring Squid
Quick start
Syntax of the configuration file
Types of directives
Single valued directives
Boolean-valued or toggle directives
Multi-valued directives
Directives with time as a value
Directives with file or memory size as values
Have a go hero โ categorize the directives
HTTP port
Time for action โ setting the HTTP port
What just happened?
Access control lists
Time for action โ constructing simple ACLs
What just happened?
Have a go hero โ understanding the pre-defined ACLs
Controlling access to the proxy server
HTTP access control
Time for action โ combining ACLs and HTTP access
What just happened?
HTTP reply access
ICP access
HTCP access
HTCP CLR access
Miss access
Ident lookup access
Cache peers or neighbors
Declaring cache peers
Time for action โ adding a cache peer
What just happened?
Quickly restricting access to domains using peers
Advanced control on access using peers
Caching web documents
Using main memory (RAM) for caching
In-transit objects or current requests
Hot or popular objects
Negatively cached objects
Specifying cache space in RAM
Time for action โ specifying space for memory caching
What just happened?
Have a go hero โ calculating cache_mem for your machine
Maximum object size in memory
Memory cache mode
Using hard disks for caching
Specifying the storage space
Storage types
Choosing a directory name or location
Time for action โ creating a cache directory
What just happened?
Declaring the size of the cache
Configuring the number of sub directories
Read-only cache
Time for action โ adding a cache directory
What just happened?
Cache directory selection
Cache object size limits
Setting limits on object replacement
Cache replacement policies
Least recently used (LRU)
Greedy dual size frequency (GDSF)
Least frequently used with dynamic aging (LFUDA)
Tuning Squid for enhanced caching
Selective caching
Time for action โ preventing the caching of local content
What jus...