[ Team LiB ] Previous Section Next Section

• Table of Contents
• Index
• Reviews
• Reader Reviews
• Errata
Apache Cookbook
By Rich Bowen, Ken Coar
Publisher: O'Reilly
Pub Date: November 2003
ISBN: 0-596-00191-6
Pages: 254

      What's in This Book
      Platform Notes
      Other Books
      Other Sources
      How This Book Is Organized
      Conventions Used in This Book
      We'd Like to Hear from You
    Chapter 1.  Installation
      Recipe 1.1.  Installing from Red Hat Linux's Packages
      Recipe 1.2.  Installing Apache on Windows
      Recipe 1.3.  Downloading the Apache Sources
      Recipe 1.4.  Building Apache from the Sources
      Recipe 1.5.  Installing with ApacheToolbox
      Recipe 1.6.  Starting, Stopping, and Restarting Apache
      Recipe 1.7.  Uninstalling Apache
    Chapter 2.  Adding Common Modules
      Recipe 2.1.  Installing a Generic Third-Party Module
      Recipe 2.2.  Installing mod_dav on a Unixish System
      Recipe 2.3.  Installing mod_dav on Windows
      Recipe 2.4.  Installing mod_perl on a Unixish System
      Recipe 2.5.  Installing mod_php on a Unixish System
      Recipe 2.6.  Installing mod_php on Windows
      Recipe 2.7.  Installing the mod_snake Python Module
      Recipe 2.8.  Installing mod_ssl
    Chapter 3.  Logging
      Recipe 3.1.  Getting More Details in Your Log Entries
      Recipe 3.2.  Getting More Detailed Errors
      Recipe 3.3.  Logging POST Contents
      Recipe 3.4.  Logging a Proxied Client's IP Address
      Recipe 3.5.  Logging Client MAC Addresses
      Recipe 3.6.  Logging Cookies
      Recipe 3.7.  Not Logging Image Requests from Local Pages
      Recipe 3.8.  Logging Requests by Day or Hour
      Recipe 3.9.  Rotating Logs on the First of the Month
      Recipe 3.10.  Logging Hostnames Instead of IP Addresses
      Recipe 3.11.  Maintaining Separate Logs for Each Virtual Host
      Recipe 3.12.  Logging Proxy Requests
      Recipe 3.13.  Logging Errors for Virtual Hosts to Multiple Files
      Recipe 3.14.  Logging Server IP Addresses
      Recipe 3.15.  Logging the Referring Page
      Recipe 3.16.  Logging the Name of the Browser Software
      Recipe 3.17.  Logging Arbitrary Request Header Fields
      Recipe 3.18.  Logging Arbitrary Response Header Fields
      Recipe 3.19.  Logging Activity to a MySQL Database
      Recipe 3.20.  Logging to syslog
      Recipe 3.21.  Logging User Directories
    Chapter 4.  Virtual Hosts
      Recipe 4.1.  Setting Up Name-Based Virtual Hosts
      Recipe 4.2.  Designating One Name-Based Virtual Host as the Default
      Recipe 4.3.  Setting Up Address-Based Virtual Hosts
      Recipe 4.4.  Creating a Default Address-Based Virtual Host
      Recipe 4.5.  Mixing Address-Based and Name-Based Virtual Hosts
      Recipe 4.6.  Mass Virtual Hosting with mod_vhost_alias
      Recipe 4.7.  Mass Virtual Hosting Using Rewrite Rules
      Recipe 4.8.  SSL and Name-Based Virtual Hosts
      Recipe 4.9.  Logging for Each Virtual Host
      Recipe 4.10.  Splitting Up a LogFile
      Recipe 4.11.  Port-Based Virtual Hosts
      Recipe 4.12.  Displaying the Same Content on Several Addresses
    Chapter 5.  Aliases, Redirecting, and Rewriting
      Recipe 5.1.  Showing Highlighted PHP Source Without Symlinking
      Recipe 5.2.  Mapping a URL to a Directory
      Recipe 5.3.  Creating a New URL for Existing Content
      Recipe 5.4.  Giving Users Their Own URL
      Recipe 5.5.  Aliasing Several URLs with a Single Directive
      Recipe 5.6.  Mapping Several URLs to the Same CGI Directory
      Recipe 5.7.  Creating a CGI Directory for Each User
      Recipe 5.8.  Redirecting to Another Location
      Recipe 5.9.  Redirecting Several URLs to the Same Destination
      Recipe 5.10.  Permitting Case-Insensitive URLs
      Recipe 5.11.  Replacing Text in Requested URLs
      Recipe 5.12.  Rewriting Path Information to CGI Arguments
      Recipe 5.13.  Denying Access to Unreferred Requests
      Recipe 5.14.  Rewriting Based on the Query String
      Recipe 5.15.  Redirecting All—or Part—of Your Server to SSL
      Recipe 5.16.  Turning Directories into Hostnames
      Recipe 5.17.  Redirecting All Requests to a Single Host
      Recipe 5.18.  Turning Document Names into Arguments
    Chapter 6.  Security
      Recipe 6.1.  Using System Account Information for Web Authentication
      Recipe 6.2.  Setting Up Single-Use Passwords
      Recipe 6.3.  Expiring Passwords
      Recipe 6.4.  Limiting Upload Size
      Recipe 6.5.  Restricting Images from Being Used Off-Site
      Recipe 6.6.  Requiring Both Weak and Strong Authentication
      Recipe 6.7.  Managing .htpasswd Files
      Recipe 6.8.  Making Password Files for Digest Authentication
      Recipe 6.9.  Relaxing Security in a Subdirectory
      Recipe 6.10.  Lifting Restrictions Selectively
      Recipe 6.11.  Authorizing Using File Ownership
      Recipe 6.12.  Storing User Credentials in a MySQL Database
      Recipe 6.13.  Accessing the Authenticated Username
      Recipe 6.14.  Obtaining the Password Used to Authenticate
      Recipe 6.15.  Preventing Brute-Force Password Attacks
      Recipe 6.16.  Using Digest Versus Basic Authentication
      Recipe 6.17.  Accessing Credentials Embedded in URLs
      Recipe 6.18.  Securing WebDAV
      Recipe 6.19.  Enabling WebDAV Without Making Files Writable by the Web User
      Recipe 6.20.  Restricting Proxy Access to Certain URLs
      Recipe 6.21.  Protecting Files with a Wrapper
      Recipe 6.22.  Protecting All Files Except a Subset
      Recipe 6.23.  Protecting Server Files from Malicious Scripts
      Recipe 6.24.  Setting Correct File Permissions
      Recipe 6.25.  Running a Minimal Module Set
      Recipe 6.26.  Restricting Access to Files Outside Your Web Root
      Recipe 6.27.  Limiting Methods by User
      Recipe 6.28.  Restricting Range Requests
    Chapter 7.  SSL
      Recipe 7.1.  Installing SSL
      Recipe 7.2.  Generating SSL Certificates
      Recipe 7.3.  Generating a Trusted CA
      Recipe 7.4.  Serving a Portion of Your Site via SSL
      Recipe 7.5.  Authenticating with Client Certificates
    Chapter 8.  Dynamic Content
      Recipe 8.1.  Enabling a CGI Directory
      Recipe 8.2.  Enabling CGI Scripts in Non-ScriptAliased Directories
      Recipe 8.3.  Using Windows File Extensionsto Launch CGI Programs
      Recipe 8.4.  Using Extensions to Identify CGI Scripts
      Recipe 8.5.  Testing That CGI Is Set Up Correctly
      Recipe 8.6.  Reading Form Parameters
      Recipe 8.7.  Invoking a CGI Program for Certain Content Types
      Recipe 8.8.  Getting SSIs to Work
      Recipe 8.9.  Displaying Last Modified Date
      Recipe 8.10.  Including a Standard Header
      Recipe 8.11.  Including the Output of a CGI Program
      Recipe 8.12.  Running CGI Scripts as a Different User with suexec
      Recipe 8.13.  Installing a mod_perl Handler from CPAN
      Recipe 8.14.  Writing a mod_perl Handler
      Recipe 8.15.  Enabling PHP Script Handling
      Recipe 8.16.  Verifying PHP Installation
    Chapter 9.  Error Handling
      Recipe 9.1.  Handling a Missing Host Field
      Recipe 9.2.  Changing the Response Status for CGI Scripts
      Recipe 9.3.  Customized Error Messages
      Recipe 9.4.  Providing Error Documents in Multiple Languages
      Recipe 9.5.  Redirecting Invalid URLs to Some Other Page
      Recipe 9.6.  Making Internet Explorer Display Your Error Page
      Recipe 9.7.  Notification on Error Conditions
    Chapter 10.  Proxies
      Recipe 10.1.  Securing Your Proxy Server
      Recipe 10.2.  Preventing Your Proxy Server from Being Used as an Open Mail Relay
      Recipe 10.3.  Forwarding Requests to Another Server
      Recipe 10.4.  Blocking Proxied Requests to Certain Places
      Recipe 10.5.  Proxying mod_perl Content to Another Server
      Recipe 10.6.  Configuring a Caching Proxy Server
      Recipe 10.7.  Filtering Proxied Content
      Recipe 10.8.  Requiring Authentication for a Proxied Server
    Chapter 11.  Performance
      Recipe 11.1.  Determining How Much Memory You Need
      Recipe 11.2.  Benchmarking Apache with ab
      Recipe 11.3.  Tuning Keepalive Settings
      Recipe 11.4.  Getting a Snapshot of Your Site's Activity
      Recipe 11.5.  Avoiding DNS Lookups
      Recipe 11.6.  Optimizing Symbolic Links
      Recipe 11.7.  Minimizing the Performance Impact of .htaccess Files
      Recipe 11.8.  Disabling Content Negotiation
      Recipe 11.9.  Optimizing Process Creation
      Recipe 11.10.  Tuning Thread Creation
      Recipe 11.11.  Caching Frequently Viewed Files
      Recipe 11.12.  Sharing Load Between Servers Using mod_proxy
      Recipe 11.13.  Distributing Load Evenly Between Several Servers
      Recipe 11.14.  Caching Directory Listings
      Recipe 11.15.  Speeding Up Perl CGI Programs with mod_perl
    Chapter 12.  Miscellaneous Topics
      Recipe 12.1.  Placing Directives Properly
      Recipe 12.2.  Renaming .htaccess Files
      Recipe 12.3.  Generating Directory/Folder Listings
      Recipe 12.4.  Solving the "Trailing Slash" Problem
      Recipe 12.5.  Setting the Content-Type According to Browser Capability
      Recipe 12.6.  Handling Missing Host: Header Fields
      Recipe 12.7.  Alternate Default Document
      Recipe 12.8.  Setting Up a Default "Favicon"
    Appendix A.  Using Regular Expressions in Apache
      Section A.1.  What Directives Use Regular Expressions?
    Appendix B.  Troubleshooting
      Section B.1.  Troubleshooting Methodology
      Section B.2.  Debugging the Configuration
      Section B.3.  Debugging Premature End of Script Headers
      Section B.4.  Common Problems on Windows
      Section B.5.  Fixing Build-Time Error Messages
      Section B.6.  Getting Server-Side Includes to Work
      Section B.7.  Debugging Rewrites That Result in "Not Found" Errors
      Section B.8.  .htaccess Files Having No Effect
      Section B.9.  Address Already in Use
[ Team LiB ] Previous Section Next Section