Buying Options
Apache Cookbook
Print $29.95
Add to Cart
Print+Ebook $32.95
Add to Cart
Ebook $23.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £22.99
Add to Cart
What is this?
Description
The Apache Cookbook is a collection of problems, solutions, and practical examples for webmasters, web administrators, programmers, and everyone else who works with Apache. Instead of poking around mailing lists, online documentation, and other sources, you can rely on the Apache Cookbook for quick solutions to common problems, and then you can spend your time and energy where it matters most. Full Description
Table of Contents
  1. Chapter 1 Installation

    1. Installing from Red Hat Linux's Packages

    2. Installing Apache on Windows

    3. Downloading the Apache Sources

    4. Building Apache from the Sources

    5. Installing with ApacheToolbox

    6. Starting, Stopping, and Restarting Apache

    7. Uninstalling Apache

  2. Chapter 2 Adding Common Modules

    1. Installing a Generic Third-Party Module

    2. Installing mod_dav on a Unixish System

    3. Installing mod_dav on Windows

    4. Installing mod_perl on a Unixish System

    5. Installing mod_php on a Unixish System

    6. Installing mod_php on Windows

    7. Installing the mod_snake Python Module

    8. Installing mod_ssl

  3. Chapter 3 Logging

    1. Getting More Details in Your Log Entries

    2. Getting More Detailed Errors

    3. Logging POST Contents

    4. Logging a Proxied Client's IP Address

    5. Logging Client MAC Addresses

    6. Logging Cookies

    7. Not Logging Image Requests from Local Pages

    8. Logging Requests by Day or Hour

    9. Rotating Logs on the First of the Month

    10. Logging Hostnames Instead of IP Addresses

    11. Maintaining Separate Logs for Each Virtual Host

    12. Logging Proxy Requests

    13. Logging Errors for Virtual Hosts to Multiple Files

    14. Logging Server IP Addresses

    15. Logging the Referring Page

    16. Logging the Name of the Browser Software

    17. Logging Arbitrary Request Header Fields

    18. Logging Arbitrary Response Header Fields

    19. Logging Activity to a MySQL Database

    20. Logging to syslog

    21. Logging User Directories

  4. Chapter 4 Virtual Hosts

    1. Setting Up Name-Based Virtual Hosts

    2. Designating One Name-Based Virtual Host as the Default

    3. Setting Up Address-Based Virtual Hosts

    4. Creating a Default Address-Based Virtual Host

    5. Mixing Address-Based and Name-Based Virtual Hosts

    6. Mass Virtual Hosting with mod_vhost_alias

    7. Mass Virtual Hosting Using Rewrite Rules

    8. SSL and Name-Based Virtual Hosts

    9. Logging for Each Virtual Host

    10. Splitting Up a LogFile

    11. Port-Based Virtual Hosts

    12. Displaying the Same Content on Several Addresses

  5. Chapter 5 Aliases, Redirecting, and Rewriting

    1. Showing Highlighted PHP Source Without Symlinking

    2. Mapping a URL to a Directory

    3. Creating a New URL for Existing Content

    4. Giving Users Their Own URL

    5. Aliasing Several URLs with a Single Directive

    6. Mapping Several URLs to the Same CGI Directory

    7. Creating a CGI Directory for Each User

    8. Redirecting to Another Location

    9. Redirecting Several URLs to the Same Destination

    10. Permitting Case-Insensitive URLs

    11. Replacing Text in Requested URLs

    12. Rewriting Path Information to CGI Arguments

    13. Denying Access to Unreferred Requests

    14. Rewriting Based on the Query String

    15. Redirecting All—or Part—of Your Server to SSL

    16. Turning Directories into Hostnames

    17. Redirecting All Requests to a Single Host

    18. Turning Document Names into Arguments

  6. Chapter 6 Security

    1. Using System Account Information for Web Authentication

    2. Setting Up Single-Use Passwords

    3. Expiring Passwords

    4. Limiting Upload Size

    5. Restricting Images from Being Used Off-Site

    6. Requiring Both Weak and Strong Authentication

    7. Managing .htpasswd Files

    8. Making Password Files for Digest Authentication

    9. Relaxing Security in a Subdirectory

    10. Lifting Restrictions Selectively

    11. Authorizing Using File Ownership

    12. Storing User Credentials in a MySQL Database

    13. Accessing the Authenticated Username

    14. Obtaining the Password Used to Authenticate

    15. Preventing Brute-Force Password Attacks

    16. Using Digest Versus Basic Authentication

    17. Accessing Credentials Embedded in URLs

    18. Securing WebDAV

    19. Enabling WebDAV Without Making Files Writable by the Web User

    20. Restricting Proxy Access to Certain URLs

    21. Protecting Files with a Wrapper

    22. Protecting All Files Except a Subset

    23. Protecting Server Files from Malicious Scripts

    24. Setting Correct File Permissions

    25. Running a Minimal Module Set

    26. Restricting Access to Files Outside Your Web Root

    27. Limiting Methods by User

    28. Restricting Range Requests

  7. Chapter 7 SSL

    1. Installing SSL

    2. Generating SSL Certificates

    3. Generating a Trusted CA

    4. Serving a Portion of Your Site via SSL

    5. Authenticating with Client Certificates

  8. Chapter 8 Dynamic Content

    1. Enabling a CGI Directory

    2. Enabling CGI Scripts in Non-ScriptAliased Directories

    3. Using Windows File Extensionsto Launch CGI Programs

    4. Using Extensions to Identify CGI Scripts

    5. Testing That CGI Is Set Up Correctly

    6. Reading Form Parameters

    7. Invoking a CGI Program for Certain Content Types

    8. Getting SSIs to Work

    9. Displaying Last Modified Date

    10. Including a Standard Header

    11. Including the Output of a CGI Program

    12. Running CGI Scripts as a Different User with suexec

    13. Installing a mod_perl Handler from CPAN

    14. Writing a mod_perl Handler

    15. Enabling PHP Script Handling

    16. Verifying PHP Installation

  9. Chapter 9 Error Handling

    1. Handling a Missing Host Field

    2. Changing the Response Status for CGI Scripts

    3. Customized Error Messages

    4. Providing Error Documents in Multiple Languages

    5. Redirecting Invalid URLs to Some Other Page

    6. Making Internet Explorer Display Your Error Page

    7. Notification on Error Conditions

  10. Chapter 10 Proxies

    1. Securing Your Proxy Server

    2. Preventing Your Proxy Server from Being Used as an Open Mail Relay

    3. Forwarding Requests to Another Server

    4. Blocking Proxied Requests to Certain Places

    5. Proxying mod_perl Content to Another Server

    6. Configuring a Caching Proxy Server

    7. Filtering Proxied Content

    8. Requiring Authentication for a Proxied Server

  11. Chapter 11 Performance

    1. Determining How Much Memory You Need

    2. Benchmarking Apache with ab

    3. Tuning Keepalive Settings

    4. Getting a Snapshot of Your Site's Activity

    5. Avoiding DNS Lookups

    6. Optimizing Symbolic Links

    7. Minimizing the Performance Impact of .htaccess Files

    8. Disabling Content Negotiation

    9. Optimizing Process Creation

    10. Tuning Thread Creation

    11. Caching Frequently Viewed Files

    12. Sharing Load Between Servers Using mod_proxy

    13. Distributing Load Evenly Between Several Servers

    14. Caching Directory Listings

    15. Speeding Up Perl CGI Programs with mod_perl

  12. Chapter 12 Miscellaneous Topics

    1. Placing Directives Properly

    2. Renaming .htaccess Files

    3. Generating Directory/Folder Listings

    4. Solving the "Trailing Slash" Problem

    5. Setting the Content-Type According to Browser Capability

    6. Handling Missing Host: Header Fields

    7. Alternate Default Document

    8. Setting Up a Default "Favicon"

  1. Appendix A Using Regular Expressions in Apache

    1. What Directives Use Regular Expressions?

  2. Appendix B Troubleshooting

    1. Troubleshooting Methodology

    2. Debugging the Configuration

    3. Debugging Premature End of Script Headers

    4. Common Problems on Windows

    5. Fixing Build-Time Error Messages

    6. Getting Server-Side Includes to Work

    7. Debugging Rewrites That Result in "Not Found" Errors

    8. .htaccess Files Having No Effect

    9. Address Already in Use

  3. Colophon

View Full Table of Contents
Product Details
Title: Apache Cookbook
By: Ken Coar, Rich Bowen
Publisher: O'Reilly Media
Print Release: November 2003
Ebook Release: February 2009
Pages: 256 pages
Print ISBN: 978-0-596-00191-9 | ISBN 10: 0-596-00191-6
Ebook ISBN: 978-0-596-10322-4 | ISBN 10: 0-596-10322-1
About the Authors
  1. Ken Coar

    Ken Coar is a member of the Apache Software Foundation, the body that oversees Apache development. He is the author of Apache Server for Dummies (January 1998) and co-author of Apache Server Unleashed (March 2000). Ken has been responsible for fielding email sent to the Apache project, and his experience with that mailing list provided a foundation for this book.

    View Ken Coar's full profile page.

  2. Rich Bowen

    Rich Bowen is a member of the Apache Software Foundation, working primarily on the documentation for the Apache Web Server. He lives in Lexington, Kentucky, where he spends his free time GeoCaching. He also enjoys flying kites and reading stuff by Charles Dickens and his contemporaries. Rich is a coauthor of Apache Administrators Handbook and Apache Cookbook. Rich, or DrBacchus--his handle on IRC--also spends entirely too much time on #apache. You can find him on the web at http://www.drbacchus.com/journal/.

    View Rich Bowen's full profile page.

Colophon
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Apache Cookbook is a moose. The moose roams the forests of North America, Europe, and Russia. It's the largest of the deer family, and the largest moose of all, Alces alces gigas, is found throughout Alaska. This particular moose, in fact, is so ubiquitous that it's played an important role in the development of the state--though the relationship between moose and men is often adversarial. Moose have a high reproductive potential and can quickly fill a range to capacity. And in Alaska, the removal of mature timber through logging and fire has benefited them by providing new stands of young timber--high-quality moose food. Moose get to be a pain when they eat crops, stand on airfields, wander the city streets, and collide with cars and trains. But in general, these animals are good for the state's economy. Moose are an essential part of the Alaskan landscape, providing tourist photo opportunities when they feed along the highway. Residents and out-of-state hunters harvest 6,000 to 8,000 moose annually--approximately 3.5 million pounds of meat. The future for these animals in Alaska is reasonably bright because humans are learning how to manage moose habitat with wildlife and how to mitigate factors that affect moose populations, such as hunting and predation by wolves and bears. Sarah Sherman was the production editor and copyeditor, and Marlowe Shaeffer was the proofreader for Apache Cookbook. Matt Hutchinson and Claire Cloutier provided quality control. Julie Hawks wrote the index. Emma Colby designed the cover of this book, based on a series design by Edie Freedman. The cover image is an original engraving from The Illustrated Natural History: Mammalia. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font. David Futato designed the interior layout. This book was converted by Julie Hawks to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Ed Stephenson.