+ All Categories
Home > Technology > Apache2 BootCamp : Understanding Apache Internals

Apache2 BootCamp : Understanding Apache Internals

Date post: 15-Jun-2015
Category:
Upload: wildan-maulana
View: 3,035 times
Download: 3 times
Share this document with a friend
Popular Tags:
18
#2 Day #1 Understanding Apache Internals Wildan Maulana [email protected] http://workshop.openthinklabs.com
Transcript
Page 1: Apache2 BootCamp : Understanding Apache Internals

#2

Day #1

Understanding Apache Internals

Wildan [email protected]

http://workshop.openthinklabs.com

Page 2: Apache2 BootCamp : Understanding Apache Internals

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

Evolution of The Web

Static Content Dynamic Content

Page 4: Apache2 BootCamp : Understanding Apache Internals

Apache Architecture

Page 5: Apache2 BootCamp : Understanding Apache Internals

Multi-Processing Modules (MPMs)

Page 6: Apache2 BootCamp : Understanding Apache Internals

Additional MPMs

● Perchild MPMMaintains several process running under different user IDs.

Page 7: Apache2 BootCamp : Understanding Apache Internals

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

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

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

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

Connector Modules

Apache ↔ Connector ↔ {External Application}

ex. BEA Weblogic, Tomcat Servlet Engine

Page 12: Apache2 BootCamp : Understanding Apache Internals

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

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

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

A Day in the Life of a Request

Page 16: Apache2 BootCamp : Understanding Apache Internals

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 18: Apache2 BootCamp : Understanding Apache Internals

Reference

● Daniel Lopez Ridruezo; SAMS Teach Yourself Apache2 in 24 Hours, SAMS Publishing, 2002 (Buy this book on Amazon)


Recommended