Muutke küpsiste eelistusi

Apache Cookbook 2e 2nd edition [Pehme köide]

  • Formaat: Paperback / softback, 310 pages, kõrgus x laius x paksus: 236x190x18 mm, black & white illustrations
  • Sari: Cookbooks
  • Ilmumisaeg: 29-Jan-2008
  • Kirjastus: O'Reilly Media
  • ISBN-10: 0596529945
  • ISBN-13: 9780596529949
Teised raamatud teemal:
  • Pehme köide
  • Hind: 43,68 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 51,39 €
  • Säästad 15%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 2-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 310 pages, kõrgus x laius x paksus: 236x190x18 mm, black & white illustrations
  • Sari: Cookbooks
  • Ilmumisaeg: 29-Jan-2008
  • Kirjastus: O'Reilly Media
  • ISBN-10: 0596529945
  • ISBN-13: 9780596529949
Teised raamatud teemal:
This "cookbook" collects time-saving recipes in one convenient place, providing 200 solutions to problems commonly faced with Apache Web Server versions 2.0 and 2.2. Every recipe comes from real-life situations, encountered either by the authors or by people who have asked for their help. Topics range from basic compilation of the source code to complex problems involving the treatment of URLs that require SSL encryption. The recipes are geared to two major platforms: UNIX (such as Linux, FreeBSD, and Solaris) and Windows. There are also many recipes that have no platform-specific aspects. Most case examples of code are in the form of excerpts from scripts, rather than actual application code. Coar is responsible for fielding e-mail sent to the Apache project; his experience with that mailing list provided a foundation for this book. Bowen works on the documentation for Apache Web server. Annotation ©2008 Book News, Inc., Portland, OR (booknews.com)

Apache is far and away the most widely used Web server platform available. This book lists common problems, their solutions, and practical examples--along with an impressive collection of useful code--for webmasters, administrators, and programmers.

There's plenty of documentation on installing and configuring the Apache web server, but where do you find help for the day-to-day stuff, like adding common modules or fine-tuning your activity logging? That's easy. The new edition of the Apache Cookbook offers you updated solutions to the problems you're likely to encounter with the new versions of Apache.

Written by members of the Apache Software Foundation, and thoroughly revised for Apache versions 2.0 and 2.2, recipes in this book 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. Altogether, you get more than 200 timesaving recipes for solving a crisis or other deadline conundrums, with topics including:

  • Security
  • Aliases, Redirecting, and Rewriting
  • CGI Scripts, the suexec Wrapper, and other dynamic content techniques
  • Error Handling
  • SSL
  • Performance
This book tackles everything from beginner problems to those faced by experienced users. For every problem addressed in the book, you will find a worked-out solution that includes short, focused pieces of code you can use immediately. You also get explanations of how and why the code works, so you can adapt the problem-solving techniques to similar situations.

Instead of poking around mailing lists, online documentation, and other sources, rely on the Apache Cookbook for quick solutions when you need them. Then you can spend your time and energy where it matters most.



Apache is far and away the most widely used Web server platform available. This book lists common problems, their solutions, and practical examples--along with an impressive collection of useful code--for webmasters, administrators, and programmers.
Preface xi
Installation
1(26)
Installing from Red Hat Linux's Packages
2(1)
Installing from Debian Packages
3(1)
Installing Apache on Windows
4(7)
Downloading the Apache Sources
11(2)
Building Apache from the Sources
13(1)
Installing with ApacheToolbox
14(2)
Starting, Stopping, and Restarting Apache
16(1)
Uninstalling Apache
17(3)
Which Version of Apache to Use
20(1)
Upgrading Using config.nice
21(1)
Starting Apache at Boot
22(1)
Useful configure Options
23(2)
Finding Apache's Files
25(2)
Adding Common Modules
27(16)
Installing a Generic Third-Party Module
28(1)
Installing mod_dav on a Unixish System
28(3)
Installing mod_dav on Windows
31(2)
Installing mod_perl on a Unixish System
33(2)
Installing mod_php on a Unixish System
35(1)
Installing mod_php on Windows
36(1)
Installing mod_ssl
37(1)
Finding Modules Using modules.apache.org
38(1)
Installing mod_security
39(1)
Why Won't This Module Work?
40(3)
Logging
43(26)
Getting More Details in Your Log Entries
46(1)
Getting More Detailed Errors
47(2)
Logging POST Contents
49(1)
Logging a Proxied Client's IP Address
50(1)
Logging Client MAC Addresses
51(1)
Logging Cookies
51(2)
Not Logging Image Requests from Local Pages
53(1)
Rotating Logfiles at a Particular Time
54(1)
Rotating Logs on the First of the Month
55(1)
Logging Hostnames Instead of IP Addresses
56(1)
Maintaining Separate Logs for Each Virtual Host
57(1)
Logging Proxy Requests
58(1)
Logging Errors for Virtual Hosts to Multiple Files
59(1)
Logging Server IP Addresses
60(1)
Logging the Referring Page
61(1)
Logging the Name of the Browser Software
62(1)
Logging Arbitrary Request Header Fields
63(1)
Logging Arbitrary Response Header Fields
63(1)
Logging Activity to a MySQL Database
64(1)
Logging to syslog
65(2)
Logging User Directories
67(2)
Virtual Hosts
69(14)
Setting Up Name-Based Virtual Hosts
70(2)
Designating One Name-Based Virtual Host as the Default
72(1)
Setting Up Address-Based Virtual Hosts
73(1)
Creating a Default Address-Based Virtual Host
73(1)
Mixing Address-Based and Name-Based Virtual Hosts
74(1)
Mass Virtual Hosting with mod_vhost_alias
75(2)
Mass Virtual Hosting Using Rewrite Rules
77(1)
Logging for Each Virtual Host
78(1)
Splitting Up a Logfile
79(1)
Port-Based Virtual Hosts
79(1)
Displaying the Same Content on Several Addresses
80(1)
Defining Virtual Hosts in a Database
81(2)
Aliases, Redirecting, and Rewriting
83(24)
Mapping a URL to a Directory
83(2)
Creating a New URL for Existing Content
85(1)
Giving Users Their Own URLs
86(3)
Aliasing Several URLs with a Single Directive
89(1)
Mapping Several URLs to the Same CGI Directory
89(1)
Creating a CGI Directory for Each User
90(1)
Redirecting to Another Location
91(2)
Redirecting Several URLs to the Same Destination
93(1)
Permitting Case-Insensitive URLs
93(1)
Showing Highlighted PHP Source without Symlinking
94(2)
Replacing Text in Requested URLs
96(1)
Rewriting Path Information to CGI Arguments
96(1)
Denying Access to Unreferred Requests
97(1)
Redirecting Unreferred Requests to an Explanation Page
98(1)
Rewriting Based on the Query String
99(1)
Redirecting All---or Part---of Your Server to SSL
100(1)
Turning Directories into Hostnames
101(1)
Redirecting All Requests to a Single Host
102(1)
Turning Document Names into Arguments
102(1)
Rewriting Elements between Path and Query String
103(1)
Rewriting a Hostname to a Directory
104(1)
Turning URL Segments into Query Arguments
104(1)
Using AliasMatch, ScriptAliasMatch, and RedirectMatch
105(2)
Security
107(46)
Using System Account Information for Web Authentication
109(1)
Setting Up Single-Use Passwords
110(1)
Expiring Passwords
111(2)
Limiting Upload Size
113(2)
Restricting Images from Being Used Off-Site
115(1)
Requiring Both Weak and Strong Authentication
116(1)
Managing htpasswd Files
117(2)
Making Password Files for Digest Authentication
119(1)
Relaxing Security in a Subdirectory
120(2)
Lifting Restrictions Selectively
122(2)
Authorizing Using File Ownership
124(1)
Storing User Credentials in a MySQL Database
124(2)
Accessing the Authenticated Username
126(1)
Obtaining the Password Used to Authenticate
127(1)
Preventing Brute-Force Password Attacks
128(1)
Using Digest Versus Basic Authentication
129(1)
Accessing Credentials Embedded in URLs
130(1)
Securing WebDAV
130(1)
Enabling WebDAV Without Making Files Writable by the Web User
131(1)
Restricting Proxy Access to Certain URLs
132(2)
Protecting Files with a Wrapper
134(2)
Protecting Server Files from Malicious Scripts
136(1)
Setting Correct File Permissions
136(3)
Running a Minimal Module Set
139(2)
Restricting Access to Files Outside Your Web Root
141(1)
Limiting Methods by User
142(1)
Restricting Range Requests
143(2)
Rebutting DoS Attacks with mod_evasive
145(1)
Chrooting Apache with mod_security
146(1)
Migrating to 2.2 Authentication
147(1)
Blocking Worms with mod_security
148(1)
Mixing Read-Only and Write Access to a Subversion Repository
149(1)
Using Permanent Redirects to Obscure Forbidden URLs
150(3)
SSL
153(14)
Installing SSL
153(2)
Installing SSL on Windows
155(1)
Generating Self-Signed SSL Certificates
155(5)
Generating a Trusted CA
160(1)
Serving a Portion of Your Site via SSL
161(2)
Authenticating with Client Certificates
163(1)
SSL Virtual Hosts
164(2)
Wildcard Certificates
166(1)
Dynamic Content
167(28)
Enabling a CGI Directory
167(1)
Enabling CGI Scripts in Non-ScriptAliased Directories
168(1)
Specifying a Default Document in a CGI Directory
169(2)
Using Windows File Extensions to Launch CGI Programs
171(1)
Using Extensions to Identify CGI Scripts
172(1)
Testing that CGI Is Set Up Correctly
173(3)
Reading Form Parameters
176(2)
Invoking a CGI Program for Certain Content Types
178(2)
Getting SSIs to Work
180(2)
Displaying Last Modified Date
182(1)
Including a Standard Header
182(1)
Including the Output of a CGI Program
183(1)
Running CGI Scripts as a Different User with suexec
184(2)
Installing a mod_perl Handler from CPAN
186(1)
Writing a mod_perl Handler
187(2)
Enabling PHP Script Handling
189(1)
Verifying PHP Installation
189(1)
Parsing CGI Output for Server Side Includes
190(1)
Parsing ScriptAlias Script Output for Server-Side Includes
191(1)
Getting mod_perl to Handle All Perl Scripts
192(1)
Enabling Python Script Handling
193(2)
Error Handling
195(8)
Handling a Missing Host Field
195(1)
Changing the Response Status for CGI Scripts
196(1)
Customized Error Messages
197(1)
Providing Error Documents in Multiple Languages
198(1)
Redirecting Invalid URLs to Some Other Page
199(1)
Making Internet Explorer Display Your Error Page
200(1)
Notification on Error Conditions
201(2)
Proxies
203(12)
Securing Your Proxy Server
203(2)
Preventing Your Proxy Server from Being Used as an Open Mail Relay
205(1)
Forwarding Requests to Another Server
205(2)
Blocking Proxied Requests to Certain Places
207(1)
Proxying mod_perl Content to Another Server
207(1)
Configuring a Caching Proxy Server
208(1)
Filtering Proxied Content
209(1)
Requiring Authentication for a Proxied Server
210(1)
Load Balancing with mod_proxy_balancer
211(1)
Proxied Virtual Host
212(1)
Refusing to Proxy FTP
212(3)
Performance
215(22)
Determining How Much Memory You Need
215(2)
Benchmarking Apache with ab
217(1)
Tuning KeepAlive Settings
218(2)
Getting a Snapshot of Your Site's Activity
220(1)
Avoiding DNS Lookups
221(1)
Optimizing Symbolic Links
222(1)
Minimizing the Performance Impact of .htaccess Files
223(2)
Disabling Content Negotiation
225(2)
Optimizing Process Creation
227(1)
Tuning Thread Creation
228(1)
Caching Frequently Viewed Files
229(2)
Distributing Load Evenly Between Several Servers
231(1)
Caching Directory Listings
232(1)
Speeding Up Perl CGI Programs with mod_perl
233(2)
Caching Dynamic Content
235(2)
Directory Listings
237(16)
Generating Directory/Folder Listings
237(2)
Display a Standard Header and Footer on Directory Listings
239(1)
Applying a Stylesheet
240(1)
Hiding Things from the Listing
240(1)
Searching for Certain Files in a Directory Listing
241(1)
Sorting the List
242(1)
Allowing a Client-Specified Sort Order
242(2)
Specifying How the List Will Be Formatted
244(1)
Allowing the Client to Specify the Formatting
244(1)
Adding Descriptions to Files
245(1)
Autogenerated Document Titles
245(1)
Changing the Listing Icons
246(1)
Listing the Directories First
247(1)
Ordering by Version Number
248(1)
Allowing the End User to Specify Version Sorting
248(1)
Complete User Control of Output
249(1)
Don't Allow the End User to Modify the Listing
250(1)
Suppressing Certain Columns
250(1)
Showing Forbidden Files
251(1)
Aliases in Directory Listings
252(1)
Miscellaneous Topics
253(12)
Placing Directives Properly
253(2)
Renaming .htaccess Files
255(1)
Generating Directory/Folder Listings
256(1)
Solving the ``Trailing Slash'' Problem
257(2)
Setting the Content-Type According to Browser Capability
259(1)
Handling Missing Host: Header Fields
259(1)
Alternate Default Document
260(1)
Setting Up a Default ``Favicon''
261(1)
Directory Listings in ScriptAliased Directories
261(1)
Enabling .htaccess Files
262(1)
Converting IBM/Lotus Server-Side Includes to Apache
263(2)
Using Regular Expressions in Apache 265(6)
Troubleshooting 271(8)
Index 279


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/.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.