Apache2 BootCamp : Understanding Apache Internals
-
Upload
wildan-maulana -
Category
Technology
-
view
3.041 -
download
3
Transcript of Apache2 BootCamp : Understanding Apache Internals
![Page 2: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/2.jpg)
Overview
● How to Evolution of the Web Affected the Design of Web Servers
● The Modular Architecture of the Apache Web Server and The Benefits that Each Component Provides
● How Apache Processes a Request Internally
![Page 3: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/3.jpg)
Evolution of The Web
Static Content Dynamic Content
![Page 4: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/4.jpg)
Apache Architecture
![Page 5: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/5.jpg)
Multi-Processing Modules (MPMs)
![Page 6: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/6.jpg)
Additional MPMs
● Perchild MPMMaintains several process running under different user IDs.
![Page 7: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/7.jpg)
MPM Selection and Compatibilty
● MPM Selection Depends on many Factors :● Support for Specific Third-Party Modules and
Functionality ● Some MPMs Perform Better in Certain Platform
● Threaded MPM is preferred in most Unix platforms, including Linux and Solaris.
![Page 8: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/8.jpg)
Hooks
● A Hook is Mechanism that Enable Apache Modules to Modify the Behavior of the Server or Other Modules
● Some of the Hooks that Apache Provides :● Connection Phase● Authorization ● Header Modification● Content Handling
![Page 9: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/9.jpg)
Multi-Protocol Support
● Apache 2.0 can be Extended to Process Protocols Other Than HTTP● mod_ftp● mod_pop3
![Page 10: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/10.jpg)
Content-Handling Modules
● Content Handlers and Generators are Modules that Provides the Content that will be Returned to the Browsers.● PHP5● mod_perl
![Page 11: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/11.jpg)
Connector Modules
Apache ↔ Connector ↔ {External Application}
ex. BEA Weblogic, Tomcat Servlet Engine
![Page 12: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/12.jpg)
Filters
● You can Think of the Filtering Architecture in Apache as a Factory Assembly Line. Filters are Workers in the Factory, and Request and Responses are the Item Traveling in the Line.● Encryption● Compression● Watermarking● Virus Scanning● Session Tracking
![Page 13: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/13.jpg)
Access/Authentication/Authorization Modules
● These Modules Provides Mechanisms to Authenticate the Identify of a User and to Restrict Access to Spesific Resource● The Restriction Can be Done By
– Identify of the User
– Network Information (Such As the Client IP Address or Protocol Used)
– The Type of Resource Being Accessed
● There are Apache Authentication Modules for Difference Backend ● Unix-Style Password Files
● LDAP
● Barkeley-Style Databases
● Oracle
● Network Information Services (NIS)
![Page 14: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/14.jpg)
Apache Portable Runtime (APR)● APR is Common Library for Platform-Dependent Functionality
● APR is Divided into Core Libraries (Fundamental Portable Functions) and APR Util (Other Code that Needs to be Portable).
● APR Core Covers the Following :● File Creation and Manipulation
● Socket Programming
● Threads and Processes
● String Management
● Shared Memory
● APR Util Covers These Areas :● DBM Database Abstraction Layer
● XML Library
● Digest
● Base64 Encoding
![Page 15: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/15.jpg)
A Day in the Life of a Request
![Page 16: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/16.jpg)
A Day in the Life of a Request● Apache Startup
● Request Process
● Checking for Hooks● URI Translation Phase● Access Control Phase● Authentication● Authorization● MIME-Type Checking● Filters● Content Handler● Logging● Cleanup
![Page 17: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/17.jpg)
Q&Ahttp://workshop.openthinklabs.com/resources
![Page 18: Apache2 BootCamp : Understanding Apache Internals](https://reader033.fdocuments.in/reader033/viewer/2022042518/557dd8e9d8b42a4c238b4f7c/html5/thumbnails/18.jpg)
Reference
● Daniel Lopez Ridruezo; SAMS Teach Yourself Apache2 in 24 Hours, SAMS Publishing, 2002 (Buy this book on Amazon)