Software Development Resources
Create account | Log in | Log in with OpenID | Help

Httpd

From DocForge

httpd, or Apache HTTP Server, is a server daemon, created by the Apache Foundation, which responds to HTTP and HTTPS requests, i.e. a web server. At the very least it will respond with an HTTP header. Typically it also returns a file or executes a web application.

The Apache HTTP Server is a very popular open source web server which supports numerous features such as Subversion service, PHP, Perl, and just about any other way you can conceive of to preprocess HTML. Apache has been the most popular web server for many years because it's so scalable. Apache httpd can run perfectly fine on smaller installations, or it can scale nicely to managing a huge, automated shared web hosting server cluster.

Apache httpd is the A in the LAMP application stack.

Contents

[edit] Brief History

In the beginning, there was Apache 1.x It was nice. It was small, fast, and light.

Then, there was Apache 2.0. It was larger, and slower. It did, however, have support for multithreading, which is important on larger installations, specifically if that server has multiple CPUs and/or CPU cores. Red Hat was a key proponent of Apache 2.0, whereas many administrators championed staying with Apache 1.3, since it was smaller. They accused Apache 2.0 of having "second version syndrome." Apache 2.0 broke many Perl features because it was multithreaded, and they remained mostly broken for a long period of time.

[edit] Configuration

Apache can be configured in multiple ways. There is the initial configuration in httpd.conf or apache.conf, depending on the distribution. Beyond that, there are more configuration opportunities in .htaccess files in your web directory, which can do everything from rewrite the URL http://docforge.com/w/index.php?title=Httpd to http://www.docforge.com/wiki/Httpd, to password protect a directory or just a few files, to override plugins, and much, much more. The breadth of what you can tweak with Apache is quite frightening, and as such it has many smaller cousins, such as LightHTTPD, which specialize in more tightly defined roles, whereas Apache can be made to do most all of them with a little elbow grease and a good backup system.

[edit] Core Configuration Settings

[edit] Configuration files

By default, Apache uses /usr/local/apache2 as the path prefix. On recommended deployments, you may see the configuration files appear in /etc/apache2. Regardless of the prefix directory, the configuration file can either be found there or in a subdirectory.

  • apache2.conf is the main configuration file.
  • envvars contains environment variables used by Apache. It may also indirectly identify the web server folder in-use.

[edit] Modules

[edit] External links

Discuss