13.06.2015 Views

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 4<br />

Configuration files<br />

http://httpd.apache.org/docs/mod/directives.htmlhttp://httpd.apache.org/docs/mod/core.html#include<br />

4.1 <strong>Introduction</strong><br />

<strong>Apache</strong> is configured with plain text files. While <strong>the</strong>re are GUI (Graphical User Interface) <strong>to</strong>ols for configuring<br />

<strong>Apache</strong>, most of this section, as well as <strong>the</strong> rest of this book, will assume that you will configure <strong>Apache</strong><br />

using a text edi<strong>to</strong>r, and editing <strong>the</strong>se files. (See Section 4.7 for information about GUI configuration <strong>to</strong>ols.)<br />

4.2 The files<br />

Configuration may be in several places:<br />

• httpd.conf<br />

There used <strong>to</strong> be 3 distinct configuration files, each of which could contain only a<br />

particular type of configuration directive. httpd.conf was <strong>the</strong> main server configuration<br />

file, and contained directives relating <strong>to</strong> <strong>the</strong> operation of <strong>the</strong> primary functions<br />

of <strong>the</strong> server. srm.comf (<strong>Server</strong> Resource Management) contained directives relating<br />

<strong>to</strong> <strong>the</strong> resources that <strong>the</strong> server could use, such as files and direc<strong>to</strong>ries. access.conf<br />

contained directives relating <strong>to</strong> access control and au<strong>the</strong>ntication.<br />

There was a great deal of confusion as <strong>to</strong> what directives should go in<strong>to</strong> which files. This<br />

confusion was actually increased when <strong>the</strong> restriction was lifted, and any configuration<br />

directive could go anywhere. Seems that people would ra<strong>the</strong>r be <strong>to</strong>ld where <strong>to</strong> put<br />

what than <strong>to</strong> be able <strong>to</strong> choose.<br />

Finally, in 1.3.7, this whole state of affairs was put <strong>to</strong> rest, and <strong>the</strong> three configuration<br />

files were combined in<strong>to</strong> httpd.conf. The two o<strong>the</strong>r files were retained, but contained<br />

nothing more than a comment encouraging you not <strong>to</strong> use <strong>the</strong> files for real directives.<br />

httpd.conf is <strong>the</strong> main server configuration file. Some third party distributions of <strong>Apache</strong> may call<br />

this file something different. Popular choices are apache.conf and apache2.conf.<br />

21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!