Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Apache HTTPd Server 2.2 Presentation

3,281 views

Published on

A presentation I gave on 06, June 2009 about Apache HTTPd 2.2 covering an overview of its functionality and capabilities when I was at NetSignature.

  • Be the first to comment

Apache HTTPd Server 2.2 Presentation

  1. 1. Apache HTTP Server 2.2 By, Ahmed Medhat
  2. 2. Introduction • Apache HTTP Server is a project from Apache Software Foundation • a.k.a HTTPD
  3. 3. Installation • Super easy on GNU/Linux, Unix.. • On RedHat derivatives – yum install httpd – service httpd start
  4. 4. Configuration • /etc/httpd/conf/httpd.conf • Important directives: – DocumentRoot (where to serve content) – Listen (bind on which socket (ip:port)) – LogLevel (debug,info,notice,warn,error,crit,alert,emerg) – DirectoryIndex (default directory index page)
  5. 5. Multi-Processing Module • Respecting modularity, you can control the most basic functions of the web server. • Responsible for: – Binding to network ports – Accepting requests – Dispatching request handling children. • Available MPM – Worker (POSIX) – Prefork (POSIX) – Mpm_winnt (for windows) *won’t talk about, Unix biased :) POSIX = Portable Operating System Interface for Unix
  6. 6. Prefork MPM • Old Apache 1.3 only MPM • Non-threaded, for sake of respect to non- thread safe libraries • Single process/thread, many child, one process rule them all • Resource hungry, Listener process embedded • Lots of tuning, expandability needs reconfiguration
  7. 7. Worker MPM • Hybrid multi-process multi-threaded server • Many threads, Many requests, Few resources • Retains stability by having many processes, each with many threads • Respects memory, GC • Listener process, The guarding angel process
  8. 8. Sample Request
  9. 9. Virtual Hosts • A blessing for business • Many web sites -> one web-server GET /hello.html HTTP/1.1 Host: www.example.com • Many web sites -> one IP address (name-based) – NameVirtualHost – <VirtualHost> • Many web sites -> many IP addresses (IP-based) – Supported out-of-the-box • Sample configuration <VirtualHost *:80> ServerAdmin webmaster@example.com DocumentRoot /var/www/example.com ServerName example.com ServerAlias www.example.com ErrorLog logs/example.com-error_log CustomLog logs/example.com-access_log common </VirtualHost>
  10. 10. Native Languages Support • mod_php • mod_python • mod_ruby • mod_cgi
  11. 11. Application Stacks Available • XAMPP http://www.apachefriends.org/en/xampp.html • WAMP http://www.wampserver.com/en/
  12. 12. Thank you  • Questions ?

×