12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

330CHAPTER 15Creating a Web Server with the Apache HTTP ServerThe default configuration file is divided into these three categories, in the order listed previously.The Apache HTTP server in <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong> has been customized for <strong>Red</strong><strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>. Thus, the default values in the default configuration file might differfrom the default values in other documentation such as the ones found at apache.org.NOTEFor a complete list of directives, go to http://httpd.apache.org/docs/2.2/mod/directives.html. When this chapter references the apache.org directive page, go to this page andclick on the name of the directive for more detailed information. This chapter describessome of the more common directives to help get you started. It is by no means a substitutionfor reading the apache.org directive documentation.Listing 15.1 shows common global configuration and main server directives that areexplained in this chapter. Any line that begins with the # character is considered acomment.Listing 15.1Sample Apache HTTP Server Configuration File#Section 1. Global configuration optionsServerRoot /etc/httpdListen 80Timeout 120KeepAlive OffMaxKeepAliveRequests 100KeepAliveTimeout 15User apacheGroup apache#Section 2. Main server configuration optionsServerAdmin webmaster@example.comServerName example.comDocumentRoot /var/www/htmlDirectoryIndex index.html index.php index.txtErrorDocument 404 /errors/404.htmlOptions Indexes MultiViewsGlobal Configuration SectionCommon directives for the global configuration section include the following. Thedefault values reflect the values found in the default configuration file included with <strong>Red</strong><strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>.ServerRootDirectory that contains the configuration files, error messages, and log files. Do notadd a forward slash at the end of the directory path. Default value: /etc/httpd

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

Saved successfully!

Ooh no, something went wrong!