pro_apache_third_edition..pdf

所需积分/C币:9 2019-08-16 10:54:06 4.66MB PDF
11
收藏 收藏
举报

Contents About the Author...............................................................................................xix About the Technical Reviewer and Contributing Author.................xxi Chapter1 Apache and the Internet..............................................1 Apache: The Anatomy of
3006Ch00_CMP212/14/038:56 AM Page il Pro Apache Third ed Copyright @2004 by Peter Wainwright All rights reserved. No part of this work may be reproduced or transmitted in any form or b any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN(pbk):1-59059-300-6 Printed and bound in the united states of america 12345678910 emarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark Technical Reviewer and Contributing Author: Bradley Bartram Editorial Board: Dan Appleman, Craig Berry, Gary Cornell, Tony Davis, Steven Rycroft, Julian Skinner, Martin Streicher, Jim Sumser, Karen Watterson, Gavin Wray, John Zukowsk Assistant Publisher: Grace Wong Project Manager: Tracy Brown Collins Development Editor: Robert J. Denn Copy Editor: Kim Wimpsett Production Manager: Kari Brooks Production editor: Laura cheu Proofreader: Nancy Sixsmith Compositor: Diana Van Winkle, Van Winkle Design Group Indexer: Kevin broccoli Cover Designer: Kurt Krames Manufacturing Manager: Tom Debolski Distributed to the book trade in the United States by Springer-Verlag New York, Inc, 175 Fifth Avenue, New York, NY, 10010 and outside the United States by Springer-Verlag gmbh Co KG Tiergartenstr. 17, 69112 Heidelberg, Germany. In the United States: phone 1-800-SPRINGER, email orders@springer-ny com, or visit http://www.springer-ny.com.OutsidetheUnitedStatesfax+496221345229,email orders@springer.de,orvisithttp://www.springerde For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley,CA94710Phone510-549-5930,fax510-549-5939,emailinfo@apress.com,orvisit http://www.apress.com The information in this book is distributed on an"as is"basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s)nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. Thesourcecodeforthisbookisavailabletoreadersathttp://www.apress.cominthedownloads section 3006Ch00CMP2 12/14/038: 56 AM Page iii Contents at a glance about the author……ix About the Technical reviewer and Contributing Author…………xi Chapter 1 apache and the Internet Chapter 2 Getting Started with Apache Chapter 3 Building Apache the Way You Want It Chapter 4 Configuring Apache the Way You Want It..155 Chapter 5 Deciding What the Client Needs .........231 Chapter 6 Delivering Dynamic Content 307 Chapter 7 Hosting More Than One Web Site. Chapter 8 Improving Apaches Performance 457 Chapter9 Monitoring apache.……………….539 Chapter 10 Securing Apache........597 Chapter 11 Improving Web Server Security....673 Chapter 12 Extending apache 727 Index…….1843 3006Ch00_CMP212/14/038:56 AM Page iv 3006Ch00CMP212/14/038:56 AM Page v Contents about the author XLr About the Technical reviewer and Contributing Author....xxi Chapter 1 Apache and the Internet......I Apache: The Anatomy of a Web Se erver The Apache Source The Apache license Support for apache ....2 How Apache Works The Hypertext Transfer Protocol Http reQuests and responses Http Headers ,.............4.4.44412 Networking and TCP/IP 13 Definitions∴13 Packets and encapsulation 14 ACKS,NAKs, and other Messages..….………15 The TCP/IP Network model 16 Non-IP Protocols …19 IP Addresses and network classes .19 Special IP Addresses…… 20 Netmasks and routing Web services: Well-Known ports 23 Internet daemon: The Networking Super Server…….….….…24 The Future: IPv6 Networking Tools 26 Server hardware...w..w..w., 29 Supported Platform Basic server requirements 30 Memory… 31 Network Interface 32 Internet Connection 32 Hard disk and controller 33 Operating System Checklist Redundancy and Backup 34 pecific Hardware Solutions…...,,.,,.,.,.,,.,.….….…..…….…..135 Get Someone else to do it 36 Summary… 3006Ch00_CMP212/14/038:56 AM Page vi Conten Chapter 2 Getting Started with apache 37 Installing apache..........38 Getting apache…………………………………… .38 Installing Apache from Binary Installing Apache from Source ............41 Installing Apache from Prebuilt Packages 41 Installing Apache by Hand 45 Upgrading apache 47 Other issues 49 Basic Configuration 50 Decisions 50 Introducing the Master Configuration File 55 Other Basic Configuration Directives 56 Starting, Stopping, and Restarting the Server 57 Starting Apache on Unix 58 Starting Apache on Windows………….….….….….….….….….….….…...59 Invocation Options…………. .60 Restarting the Server…… Stopping the Server…… 75 Starting the Server Automatically.…….….….….….….….….…6 Testing the Server .81 Testing with a browser.........................82 Testing from the Command line or a Terminal progran.…………82 Testing the Server Configuration Without Starting It………,5 Getting the Server Status from the Command line 86 Using Graphical Configuration Tools.........86 Comanche 87 TkApache 91 LinuxConf 91 ermin ∴91 Apache conf 97 Other Configuration Tools ∴9 Summary 100 Chapter 3 Building Apache the Way You Want It..101 Why Build Apache Yourself? 101 Verifying the Apache Source Archive……….….….….….….….….….103 Building apache from Source 105 Configuring and Building apache.……………,…,,,..,.,.,.,.6 Determining Which Modules to Include 111 Building apache as a Dynamic Server 116 3006Ch00CMP2 12/14/038: 56 AM Page vii Contents Changing the Module Order(apache 1.3)........ 118 Checking the generated Configuration 120 Building Apache from Source As an RPM (Apache 2).... ,122 Advanced Configuration 124 Configuring apache' s Layout...….…124 Choosing a Layout Scheme………….… 124 Choosing a Multiprocessing Module(Apache 2) 132 Rules( Apache1.3)…..,…,……,………,……,…………………135 Building Apache with suExec support.…….….….1 Configuring apache' s Supporting Files and Scripts………….139 Configuring apache2 for Cross-Platform builds………….….….....10 Configuring Apache for Production or Debug Builds……………….142 Configuring apache for binary Distribution................ 143 Configuring Apache's Library and Include Paths 143 Configuring the Build Environment 144 Building Modules with configure and apxs…………,146 Adding Third-Party Modules with configure................146 Building Modules with apxs 148 Installing modules with apxs....................................150 Generating Module Templates with apxs 151 Overriding apxs Defaults and Using apxs in makefiles……………….…152 Summar 153 Chapter 4 Configuring Apache the Way You WantIt.155 Where Apache Looks for Its Configuration. Configuration File Syntax..........................156 Configuration for Virtual Hosts 1356 Including Multiple Configuration File ∴157 Per- Directory Configuration…….….….….….….….….….….…….….159 Conditional configuration....................................160 How Apache Structures Its Configuration.....163 Apaches Container Directives..................................164 Directive Types and locations………….… 168 Where Directives Can go.......................... 171 Container Scope and Nesting 4172 How Apache Combines Containers and Their Contents……….74 Legality of Directives in Containers.…….….…. 175 Options and Overrides 176 Enabling and Disabling Features with Options 176 Overriding Directives with Per-Directory Configuration.……….179 3006Ch00CMP2 12/14/038: 56 AM Page vii Conten Restricting Access with a110 w and deny…….82 Controlling Access by Name………….183 Controlling access by Ip address …184 Controlling subnet access by Network and Netmask........... 85 Controlling Access by Http Header……… 186 Combining host-Based Access with User Authentication.........187 Overriding host- Based access……… 188 Directory Listings…. 188 Enabling and disabling directory Indices..................189 How mod autoindex generates the html Page..............190 Controlling Which Files Are Seen with Indexignore…………….196 Controlling the Sort Order...….… 197 Assigning Icons……….…..…. 199 Assigning Descriptions………….……. 202 Apaches Environment 203 Setting, Unsetting, and Passing variables from the Shell 204 Setting Variables Conditionally 205 Special browser variables 207 Detecting Robots with BrowserMatch.……….….….….….….209 Passing variables to CGI 209 Conditional access control 210 Caveats with SetEnvIf vs SetEnv 210 Setting Variables with mod_rewrite………. 211 Controlling request and Response Headers..........211 Setting Custom Response Headers……….……….….213 Setting Custom Request Headers.……………………………….215 Inserting Dynamic Values into Headers……… .216 Setting Custom Headers Conditionally. ...........217 Retrieving Response Headers from Metadata Files………….217 Setting Expiry Times ∴219 Sending Content As-Is 222 Contro1 ing the Server Identification Header……….23 Sending a Content Digest 224 Hand1 ing the Neighbors…......…………..25 Controlling robots with robots.txt………26 Controlling robots in HTML………….……………,227 Controlling robots with Access Control….….….….….….….227 Attracting robots.…………………………………………………28 Making sure robots index the right Information..............228 Known robots, Bad robots, and Further reading………229 Summary…… 220 3006Ch00_CMP212/14/038:56 AM Page ix Chapter 5 Deciding What the Client Needs...231 Content Handling and Negotiation 231 File types………………………………232 File encoding ... 236 File languages…...….….….….….….….….….….….….....243 File character sets Handling URls with Extra Path Information…….….….….,47 Content Negotiation 48 Content Negotiation with Multiviews 250 File permutations and valid urls with multiviews 256 Magic MImE Types Error and Response hand How Apache Handles errors 265 Error and response codes TheErrordocumentDirective.wwwwwwwwwwwwwwwwwwwww.266 Limitations of errordocument ....................................................................270 Aliases and redirection ∴271 Aliases and Script Aliases. Redirections 273 Rewriting uRls with mod rewrite 277 Server- Side Image Maps…… .300 Matching Misspelled URLS 305 Summary....306 Chapter 6 Delivering Dynamic Content 307 Server-side includes 308 Enabling ss Format of ssi commands. The ssi Command set ∴312 SSI Variables ………………312 Passing Trailing Path Information to SSIs ( and Other Dynamic Documents)…….….….….….….…..…115 Setting the Date and Error Format.….….….….….….….….….….….….….….….316 Templating with SSIs………… 317 Caching Server-Parsed D Identifying Server-Parsed Documents by Execute Permission......320 CGI: The Common Gateway Interface.....321 CGi and the environment 321 Configuring Apache to Recognize CGI Scripts…………,,…, Setting Up a cgi directory with ExecCG: A Simple Way…………327 Triggering CGi Scripts on Events

...展开详情
试读 127P pro_apache_third_edition..pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
  • 技术圈认证

  • 至尊王者

关注 私信
上传资源赚钱or赚积分
最新推荐
pro_apache_third_edition..pdf 9积分/C币 立即下载
1/127
pro_apache_third_edition..pdf第1页
pro_apache_third_edition..pdf第2页
pro_apache_third_edition..pdf第3页
pro_apache_third_edition..pdf第4页
pro_apache_third_edition..pdf第5页
pro_apache_third_edition..pdf第6页
pro_apache_third_edition..pdf第7页
pro_apache_third_edition..pdf第8页
pro_apache_third_edition..pdf第9页
pro_apache_third_edition..pdf第10页
pro_apache_third_edition..pdf第11页
pro_apache_third_edition..pdf第12页
pro_apache_third_edition..pdf第13页
pro_apache_third_edition..pdf第14页
pro_apache_third_edition..pdf第15页
pro_apache_third_edition..pdf第16页
pro_apache_third_edition..pdf第17页
pro_apache_third_edition..pdf第18页
pro_apache_third_edition..pdf第19页
pro_apache_third_edition..pdf第20页

试读结束, 可继续阅读

9积分/C币 立即下载