Squid Proxy Server 3.1: Beginner's Guide

Reduce bandwidth use and deliver your most frequently requested web pages more quickly with Squid Proxy Server. This guide will introduce you to the fundamentals of the caching system and help you get the most from Squid.

Squid Proxy Server 3.1: Beginner's Guide

Beginner's Guide

Kulbir SainiFebruary 2011

6 customer reviews

Reduce bandwidth use and deliver your most frequently requested web pages more quickly with Squid Proxy Server. This guide will introduce you to the fundamentals of the caching system and help you get the most from Squid.

Book Details

ISBN 139781849513906

Paperback332 pages

Book Description

Squid Proxy Server enables you to cache your web content and return it quickly on subsequent requests. System administrators often struggle with delays and too much bandwidth being used, but Squid solves these problems by handling requests locally. By deploying Squid in accelerator mode, requests are handled faster than on normal web servers making your site perform quicker than everyone else's!

Squid Proxy Server 3.1 Beginner's Guide will help you to install and configure Squid so that it is optimized to enhance the performance of your network. The Squid Proxy Server reduces the amount of effort that you will have to put in, saving your time to get the most out of your network. Whether you only run one site, or are in charge of a whole network, Squid is an invaluable tool that improves performance immeasurably. Caching and performance optimization usually requires a lot of work on the developer's part, but Squid does all that for you. This book will show you how to get the most out of Squid by customizing it for your network. You will learn about the different configuration options available and the transparent and accelerated modes that enable you to focus on particular areas of your network.

Applying proxy servers to large networks can be a lot of work as you have to decide where to place restrictions and who should have access, but the straightforward examples in this book will guide you through step by step so that you will have a proxy server that covers all areas of your network by the time you finish the book.

Time for action – translating the referer logs to a human-readable format

User agent log

Time for action – enabling user agent logging

Emulating HTTP server-like logs

Time for action – enabling HTTP server log emulation

Log file rotation

Other log related features

Summary

Chapter 6: Managing Squid and Monitoring Traffic

Cache manager

Time for action – installing Apache Web server

Time for action – configuring Apache to use cachemgr.cgi

Log file analyzers

Time for action – installing Calamaris

Time for action – generating stats in plain text format

Time for action – generating graphical reports with Calamaris

Summary

Chapter 7: Protecting your Squid Proxy Server with Authentication

HTTP authentication

Basic authentication

Time for action – exploring Basic authentication

Time for action – configuring NCSA authentication

Time for action – configuring PAM service

Time for action – configuring MSNT authentication

Time for action – configuring Squid to use SASL authentication

Time for action – configuring RADIUS authentication

Digest authentication

Time for action – configuring Digest authentication

Microsoft NTLM authentication

Negotiate authentication

Time for action – configuring Negotiate authentication

Using multiple authentication schemes

Writing a custom authentication helper

Time for action – writing a helper program

Making non-concurrent helpers concurrent

Common issues with authentication

Summary

Chapter 8: Building a Hierarchy of Squid Caches

Cache hierarchies

Reasons to use hierarchical caching

Problems with hierarchical caching

Joining a cache hierarchy

Time for action – joining a cache hierarchy

Controlling communication with peers

Time for action – configuring Squid for domain-based forwarding

Time for action – forwarding requests to cache peers using ACLs

Time for action – configuring Squid to switch peer relationship

Peer communication protocols

Summary

Chapter 9: Squid in Reverse Proxy Mode

What is reverse proxy mode?

Configuring Squid as a server surrogate

HTTP port

HTTPS port

Time for action – adding backend web servers

Logging messages in web server log format

Time for action – configuring Squid to ignore the browser reloads

Access controls in reverse proxy mode

Summary

Chapter 10: Squid in Intercept Mode

Interception caching

Time for action – understanding interception caching

Advantages of interception caching

Problems with interception caching

Diverting HTTP traffic to Squid

Time for action – enabling IP forwarding

Time for action – redirecting HTTP traffic to Squid

Summary

Chapter 11: Writing URL Redirectors and Rewriters

URL redirectors and rewriters

Squid, URL redirectors, and rewriters

Time for action – exploring the message flow between Squid and redirectors

Time for action – writing a simple URL redirector program

Writing our own URL redirector program

Time for action – writing our own template for a URL redirector

Configuring Squid

A special URL redirector – deny_info

Popular URL redirectors

Summary

Chapter 12: Troubleshooting Squid

Some common issues

Time for action – changing the ownership of log files

Time for action – fixing cache directory permissions

Time for action – creating swap directories

Time for action – finding the program listening on a specific port

Debugging problems

Time for action – debugging HTTP requests

Time for action – debugging access control

Summary

What You Will Learn

Discover which configuration option would best suit your network

Gain better control over Squid with command-line options that help you to debug Squid

Devise an Access Control List (ACL) to decide which users are granted access to different ports

Understand logfiles and log format and how to customize them to suit your needs

Learn about Squid's Cache Manager web interface so that you can monitor your traffic in real time to prevent any problems before they happen

Implement a cache hierarchy to use in a large network

Use Squid in Accelerator Mode to quickly boost the performance of a very slow website

Write your own URL rewriters to customize the behavior of Squid

Learn how to troubleshoot Squid

Authors

Kulbir Saini

Kulbir Saini is an entrepreneur based in Hyderabad, India. He has had extensive experience in managing systems and network infrastructure. Apart from his work as a freelance developer, he provides services to a number of startups. Through his blogs, he has been an active contributor of documentation for various open source projects, most notable being The Fedora Project and Squid. Besides computers, which his life practically revolves around, he loves travelling to remote places with his friends. For more details, please check http://saini.co.in/.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.