Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Buy Now $23.99
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
5Activity

Table Of Contents

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

Apache Cookbook

Ratings:

3.46

(24)
|Views: 15,489|Likes:

Apache is far and away the most widely used web server platform in the world. Both free and rock-solid, it runs more than half of the world's web sites, ranging from huge e-commerce operations to corporate intranets and smaller hobby sites, and it continues to maintain its popularity, drawing new users all the time. If you work with Apache on a regular basis, you have plenty of documentation on installing and configuring your server, but where do you go for help with the day-to-day stuff, like adding common modules or fine-tuning your activity logging?

The Apache Cookbook is a collection of problems, solutions, and practical examples for webmasters, web administrators, programmers, and everyone else who works with Apache. For every problem addressed in the book, there's a worked-out solution or "recipe"--short, focused pieces of code that you can use immediately. But this book offers more than cut-and-paste code. You also get explanations of how and why the code works, so you can adapt the problem-solving techniques to similar situations.

The recipes in the Apache Cookbook range from simple tasks, such installing the server on Red Hat Linux or Windows, to more complex tasks, such as setting up name-based virtual hosts or securing and managing your proxy server. The two hundred plus recipes in the book cover additional topics such as:

Security Aliases, Redirecting, and Rewriting CGI Scripts, the suexec Wrapper, and other dynamic content techniques Error Handling SSL Performance The impressive collection of useful code in this book is a guaranteed timesaver for all Apache users, from novices to advanced practitioners. 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.

Apache is far and away the most widely used web server platform in the world. Both free and rock-solid, it runs more than half of the world's web sites, ranging from huge e-commerce operations to corporate intranets and smaller hobby sites, and it continues to maintain its popularity, drawing new users all the time. If you work with Apache on a regular basis, you have plenty of documentation on installing and configuring your server, but where do you go for help with the day-to-day stuff, like adding common modules or fine-tuning your activity logging?

The Apache Cookbook is a collection of problems, solutions, and practical examples for webmasters, web administrators, programmers, and everyone else who works with Apache. For every problem addressed in the book, there's a worked-out solution or "recipe"--short, focused pieces of code that you can use immediately. But this book offers more than cut-and-paste code. You also get explanations of how and why the code works, so you can adapt the problem-solving techniques to similar situations.

The recipes in the Apache Cookbook range from simple tasks, such installing the server on Red Hat Linux or Windows, to more complex tasks, such as setting up name-based virtual hosts or securing and managing your proxy server. The two hundred plus recipes in the book cover additional topics such as:

Security Aliases, Redirecting, and Rewriting CGI Scripts, the suexec Wrapper, and other dynamic content techniques Error Handling SSL Performance The impressive collection of useful code in this book is a guaranteed timesaver for all Apache users, from novices to advanced practitioners. 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.

More info:

Categories:Books, Computers, Web
Publish date: Nov 18, 2003
Added to Scribd: May 16, 2009
Copyright:Traditional Copyright: All rights reservedISBN:9780596516383
List Price: $23.99 Buy Now

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
See more
See less

04/03/2014

256

9780596516383

$23.99

USD

pdf

original

You're Reading a Free Preview
Pages 4 to 131 are not shown in this preview.
You're Reading a Free Preview
Pages 134 to 256 are not shown in this preview.

Activity (5)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Lars Wirfelt liked this
Kf Gauss liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->