Apache HTTP Server
Total Page:16
File Type:pdf, Size:1020Kb
Apache HTTP Server The Apache HTTP Server, colloquially called Apache sive and kick some ass.” (/əˈpætʃiː/ ə-PA-chee), is the world’s most used web server software. Originally based on the NCSA HTTPd When Apache is running, its process name is sometimes server, development of Apache began in early 1995 af- httpd, which is short for “HTTP daemon.” ter work on the NCSA code stalled. Apache played a key role in the initial growth of the World Wide Web,[4] quickly overtaking NCSA HTTPd as the dominant HTTP server, and has remained most popular since April 1996. 2 Feature overview In 2009, it became the first web server software to serve more than 100 million websites.[5] Apache supports a variety of features, many implemented Apache is developed and maintained by an open com- as compiled modules which extend the core functional- munity of developers under the auspices of the Apache ity. These can range from server-side programming lan- Software Foundation. Most commonly used on a Unix- guage support to authentication schemes. Some common [6] like system (usually Linux), the software is available language interfaces support Perl, Python, Tcl, and PHP. for a wide variety of operating systems besides Unix, Popular authentication modules include mod_access, including eComStation, Microsoft Windows, NetWare, mod_auth, mod_digest, and mod_auth_digest, the suc- OpenVMS, OS/2, and TPF. Released under the Apache cessor to mod_digest. A sample of other features in- License, Apache is free and open-source software. clude Secure Sockets Layer and Transport Layer Secu- As of November 2015, Apache was estimated to serve rity support (mod_ssl), a proxy module (mod_proxy), a 50% of all active websites and 37% of the top servers URL rewriting module (mod_rewrite), custom log files across all domains.[7] (mod_log_config), and filtering support (mod_include and mod_ext_filter). Popular compression methods on Apache include the ex- 1 Name ternal extension module, mod_gzip, implemented to help with reduction of the size (weight) of Web pages served According to the FAQ in the Apache project website, the over HTTP. ModSecurity is an open source intrusion name Apache was chosen out of respect to the Native detection and prevention engine for Web applications. American tribe Apache and their superior skills in war- Apache logs can be analyzed through a Web browser us- fare and strategy. The name was widely believed to be a ing free scripts, such as AWStats/W3Perl or Visitors. pun on 'A Patchy Server' (since it was a set of software Virtual hosting allows one Apache installation to serve patches).[8] Official documentation used to give this ex- many different Web sites. For example, one ma- planation of the name,[9] but in a 2000 interview, Brian chine with one Apache installation could simulta- Behlendorf, one of the creators of Apache, set the record neously serve www.example.com, www.example.org, straight:[10] test47.test-server.example.edu, etc. Apache features configurable error messages, DBMS- The name literally came out of the blue. based authentication databases, and content negotiation. I wish I could say that it was something fan- It is also supported by several graphical user interfaces tastic, but it was out of the blue. I put it on (GUIs). a page and then a few months later when this project started, I pointed people to this page It supports password authentication and digital certificate and said: “Hey, what do you think of that authentication. Because the source code is freely avail- idea?" ... Someone said they liked the name able, anyone can adapt the server for specific needs, and [11] and that it was a really good pun. And I was there is a large public library of Apache add-ons. like, “A pun? What do you mean?" He said, “Well, we're building a server out of a bunch of software patches, right? So it’s a patchy 3 HTTP server and proxy features Web server.” I went, “Oh, all right.” ... When I thought of the name, no. It just sort of conno- tated: “Take no prisoners. Be kind of aggres- • Loadable Dynamic Modules 1 2 6 DEVELOPMENT • Multiple Request Processing modes (MPMs) in- 4 Performance cluding Event-based/Async, Threaded and Prefork. • Highly scalable (easily handle more than 10,000 si- Instead of implementing a single architecture, Apache multaneous connections provides a variety of MultiProcessing Modules (MPMs), which allow Apache to run in a process-based, hybrid • Handling of static files, index files, auto-indexing (process and thread) or event-hybrid mode, to better and content negotiation match the demands of each particular infrastructure. This implies that the choice of correct MPM and the cor- • [12] .htaccess support rect configuration is important. Where compromises in • Reverse proxy with caching [13] performance need to be made, the design of Apache is to reduce latency and increase throughput, relative to sim- • Load balancing[14] with in-band and out-of- ply handling more requests, thus ensuring consistent and band health checks reliable processing of requests within reasonable time- • Multiple load balancing mechanisms frames. • Fault tolerance and Failover with automatic re- For delivery of static pages, Apache 2.2 series was con- covery sidered significantly slower than nginx.[28] To address • WebSocket, FastCGI, SCGI, AJP and uWSGI this issue, the Apache version considered by the Apache support with caching Foundation as providing high-performance is the Event MPM, which mixes the use of several processes and sev- • [15] Dynamic configuration eral threads per process in an asynchronous event-based [29] • TLS/SSL with SNI and OCSP stapling support, via loop. This architecture, and the way it was imple- OpenSSL. mented in the Apache 2.4 series, provides for perfor- mance equivalent or slightly better than event-based web • Name- and IP address-based virtual servers servers, as is claimed by the president of the Apache Foundation, Jim Jagielski and others.[30][31][32] However, • IPv6-compatible some independent benchmarks show that it still is half as [33][34] • HTTP/2 protocol support fast as nginx. • Fine-grained authentication and authorization ac- cess control [16] 5 Licensing • gzip compression and decompression The Apache HTTP Server codebase was relicensed to the • URL rewriting[17] Apache 2.0 License (from the previous 1.1 license) in • Headers[18] and content[19][20] rewriting January 2004,[35] and Apache HTTP Server 1.3.31 and 2.0.49 were the first releases using the new license.[36] • Custom logging with rotation The OpenBSD project did not like the change and con- • Concurrent connection limiting tinued the use of pre-2.0 Apache versions, effectively forking Apache 1.3.x for its purposes.[37][38][39] They ini- • Request processing rate limiting tially replaced it with Nginx, and soon after made their • Bandwidth throttling own replacement, OpenBSD Httpd, based on the relayed project.[40][41][42] • Server Side Includes [21] • IP address-based geolocation 6 Development • User and Session tracking [22] • WebDAV The Apache HTTP Server Project is a collaborative software development effort aimed at creating a ro- • Embedded Perl, PHP and Lua scripting bust, commercial-grade, feature-rich and freely available source code implementation of an HTTP (Web) server. • CGI support [23] The project is jointly managed by a group of volunteers • public_html per-user web-pages [24] located around the world, using the Internet and the Web to communicate, plan, and develop the server and its re- • [25] Generic expression parser lated documentation. This project is part of the Apache • Real-time status views [26] Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the • XML support [27] project.[51][52][53] 3 7 See also [19] “mod_sed”. [20] “mod_substitute”. • .htaccess [21] “Apache httpd Tutorial: Introduction to Server Side In- • .htpasswd cludes”. • ApacheBench [22] “mod_usertrack”. • Comparison of web server software [23] “Apache Tutorial: Dynamic Content with CGI”. • IBM HTTP Server [24] “Per-user web directorie”. • LAMP (software bundle) [25] “Expressions in Apache HTTP Server”. • List of Apache modules [26] “mod_status”. • POSSE project [27] “mod_xml2enc”. • suEXEC [28] “Serving static files: a comparison between Apache, Ng- inx, Varnish and G-WAN”. Spoot!. [29] “worker - Apache HTTP Server Version 2.2”. apache.org. 8 References [30] Apache httpd 2.4 [1] “About the Apache HTTP Server Project”. Apache Soft- [31] “Picking a Proxy Server”. ware Foundation. Archived from the original on 7 June [32] “Throughput evaluation of Apache 2.4.1”. 2008. Retrieved 2008-06-25. [33] “Joshua Zhu’s Blog”. zhuzhaoyuan.com. [2] Lextrait, Vincent (January 2010). “The Programming Languages Beacon, v10.0”. Retrieved 14 March 2010. [34] “Performance of Apache 2.4 with the event MPM com- pared to Nginx”. eschrade.com. [3] “Languages”. Apache HTTP Server. Black Duck Soft- ware. Ohloh. Retrieved 2 April 2014. [35] “Apache License, Version 2.0”. The Apache Software Foundation. January 2004. Retrieved 2013-05-21. [4] Netcraft Market Share for Top Servers Across All Do- mains August 1995 - today (monthly updated) [36] Burton, Richard Antony. “FYI: Apache HTTP Server 2.0.49 Released”. Newsgroup: alt.apache.configuration. [5] “February 2009 Web Server Survey”. Netcraft. Archived from the original on 26 February 2009. Retrieved 2009- [37] de Raadt, Theo (18 February 2004). “The new apache 03-29. license”. openbsd-misc (Mailing list). Retrieved 2013-05- 21. [6] OS/GNU+Linux Distributions using Apache [38] “Copyright Policy”. OpenBSD. Retrieved 2013-05-12. [7] “November 2015 Web Server Survey”. Netcraft. Re- trieved 2015-12-15. [39] “apache-httpd-openbsd-1.3.20140502p2 – OpenBSD im- proved and secured version of Apache 1.3”. OpenBSD [8] “Why the name 'Apache'?". HTTPd Frequently Asked ports. Retrieved 2014-12-28. Questions. [40] “OpenBSD Upgrade Guide: 5.1 to 5.2”.