Apache Cookbook
Table of Contents
Last modified: Wednesday, 31 December 1969 19:00 -0500
- Preface
-
- Installation
- Installing from Red Hat Linux's Packages
- Installing Apache on Windows
- Downloading the Apache Sources
- Building Apache from the Sources
- Installing with ApacheToolbox
- Starting, Stopping, and Restarting Apache
- Uninstalling Apache
- Adding Common Modules
- Installing a Generic Third-Party Module
- Installing mod_dav on a Unixish System
- Installing mod_dav on Windows
- Installing mod_perl on a Unixish System
- Installing mod_php on a Unixish System
- Installing mod_php on Windows
- Installing the mod_snake Python Module
- Installing mod_ssl
- Logging
- Getting More Details in Your Log Entries
- Getting More Detailed Errors
- Logging POST Contents
- Logging a Proxied Client's IP Address
- Logging Client MAC Addresses
- Logging Cookies
- Not Logging Image Requests from Local Pages
- Logging Requests by Day or Hour
- Rotating Logs on the First of the Month
- Logging Hostnames Instead of IP Addresses
- Maintaining Separate Logs for Each Virtual Host
- Logging Proxy Requests
- Logging Errors for Virtual Hosts to Multiple Files
- Logging Server IP Addresses
- Logging the Referring Page
- Logging the Name of the Browser Software
- Logging Arbitrary Request Header Fields
- Logging Arbitrary Response Header Fields
- Logging Activity to a MySQL Database
- Logging to syslog
- Logging User Directories
- Virtual Hosts
- Setting Up Name-Based Virtual Hosts
- Designating One Name-Based Virtual Host as the Default
- Setting Up Address-Based Virtual Hosts
- Creating a Default Address-Based Virtual Host
- Mixing Address-Based and Name-Based Virtual Hosts
- Mass Virtual Hosting with mod_vhost_alias
- Mass Virtual Hosting Using Rewrite Rules
- SSL and Name-Based Virtual Hosts
- Logging for Each Virtual Host
- Splitting Up a LogFile
- Port-Based Virtual Hosts
- Displaying the Same Content on Several Addresses
- Aliases, Redirecting, and Rewriting
- Showing Highlighted PHP Source Without Symlinking
- Mapping a URL to a Directory
- Creating a New URL for Existing Content
- Giving Users Their Own URL
- Aliasing Several URLs with a Single Directive
- Mapping Several URLs to the Same CGI Directory
- Creating a CGI Directory for Each User
- Redirecting to Another Location
- Redirecting Several URLs to the Same Destination
- Permitting Case-Insensitive URLs
- Replacing Text in Requested URLs
- Rewriting Path Information to CGI Arguments
- Denying Access to Unreferred Requests
- Rewriting Based on the Query String
- Redirecting All-or Part-of Your Server to SSL
- Turning Directories into Hostnames
- Redirecting All Requests to a Single Host
- Turning Document Names into Arguments
- Security
- Using System Account Information for Web Authentication
- Setting Up Single-Use Passwords
- Expiring Passwords
- Limiting Upload Size
- Restricting Images from Being Used Off-Site
- Requiring Both Weak and Strong Authentication
- Managing .htpasswd Files
- Making Password Files for Digest Authentication
- Relaxing Security in a Subdirectory
- Lifting Restrictions Selectively
- Authorizing Using File Ownership
- Storing User Credentials in a MySQL Database
- Accessing the Authenticated Username
- Obtaining the Password Used to Authenticate
- Preventing Brute-Force Password Attacks
- Using Digest Versus Basic Authentication
- Accessing Credentials Embedded in URLs
- Securing WebDAV
- Enabling WebDAV Without Making Files Writable by the Web User
- Restricting Proxy Access to Certain URLs
- Protecting Files with a Wrapper
- Protecting All Files Except a Subset
- Protecting Server Files from Malicious Scripts
- Setting Correct File Permissions
- Running a Minimal Module Set
- Restricting Access to Files Outside Your Web Root
- Limiting Methods by User
- Restricting Range Requests
- SSL
- Installing SSL
- Generating SSL Certificates
- Generating a Trusted CA
- Serving a Portion of Your Site via SSL
- Authenticating with Client Certificates
- Dynamic Content
- Enabling a CGI Directory
- Enabling CGI Scripts in Non-ScriptAliased Directories
- Using Windows File Extensionsto Launch CGI Programs
- Using Extensions to Identify CGI Scripts
- Testing That CGI Is Set Up Correctly
- Reading Form Parameters
- Invoking a CGI Program for Certain Content Types
- Getting SSIs to Work
- Displaying Last Modified Date
- Including a Standard Header
- Including the Output of a CGI Program
- Running CGI Scripts as a Different User with suexec
- Installing a mod_perl Handler from CPAN
- Writing a mod_perl Handler
- Enabling PHP Script Handling
- Verifying PHP Installation
- Error Handling
- Handling a Missing Host Field
- Changing the Response Status for CGI Scripts
- Customized Error Messages
- Providing Error Documents in Multiple Languages
- Redirecting Invalid URLs to Some Other Page
- Making Internet Explorer Display Your Error Page
- Notification on Error Conditions
- Proxies
- Securing Your Proxy Server
- Preventing Your Proxy Server from Being Used as an Open Mail Relay
- Forwarding Requests to Another Server
- Blocking Proxied Requests to Certain Places
- Proxying mod_perl Content to Another Server
- Configuring a Caching Proxy Server
- Filtering Proxied Content
- Requiring Authentication for a Proxied Server
- Performance
- Determining How Much Memory You Need
- Benchmarking Apache with ab
- Tuning Keepalive Settings
- Getting a Snapshot of Your Site's Activity
- Avoiding DNS Lookups
- Optimizing Symbolic Links
- Minimizing the Performance Impact of .htaccess Files
- Disabling Content Negotiation
- Optimizing Process Creation
- Tuning Thread Creation
- Caching Frequently Viewed Files
- Sharing Load Between Servers Using mod_proxy
- Distributing Load Evenly Between Several Servers
- Caching Directory Listings
- Speeding Up Perl CGI Programs with mod_perl
- Miscellaneous Topics
- Placing Directives Properly
- Renaming .htaccess Files
- Generating Directory/Folder Listings
- Solving the "Trailing Slash" Problem
- Setting the Content-Type According to Browser Capability
- Handling Missing Host: Header Fields
- Alternate Default Document
- Setting Up a Default "Favicon"
- Using Regular Expressions in Apache
- Troubleshooting
- Installation
- Index