tab and clicking the Edit button at the right of the tab. Use the General Options item in the Virtual Hosts Properties dialog box to configure basic virtual host settings.

FIGURE 17.2 system-config-httpd
's Virtual Host Properties dialog box gives you access to numerous options for configuring the properties of an Apache virtual host.
Click the Site Configuration listing in the General Options list of this dialog box to set defaults, such as which files are loaded by default when no files are specified (the default is index.*
) in the URL.
The SSL listing in the General Options pane gives you access to settings used to enable or disable SSL, specify certificate settings, and define the SSL log filename and location. Select the Logging listing to access options for configuring where the error messages are logged, as well as where the transfer log file is kept and how much information is put in it.
Use the Environment Variables options to configure settings for the env_mod
module, used to pass environment directives to CGI programs. The Directories section configures the directory options (such as whether CGI programs are allowed to run) as well as the order entries mentioned in the httpd.conf
section.
Configuring the Server
The Server tab, shown in Figure 17.3, enables you to configure things such as where the lock file and the PID file are kept. In both cases, you should use the defaults. You can also configure the directory where any potential core dumps will be placed.

FIGURE 17.3 system-config-httpd's Server configuration tab.
Finally, you can set which user and group Apache is to run as. As mentioned in a previous note, for security reasons, you should run Apache as the user named apache and as a member of the group apache.
Configuring Apache for Peak Performance
Use the options in the Performance Tuning tab to configure Apache to provide peak performance in your system. Options in this tab set the maximum number of connections, connection timeouts, and number of requests per connection. When setting this number, keep in mind that for each connection to your server, another instance of the httpd
program might be run, depending on how Apache is built. Each instance takes resources such as CPU time and memory. You can also configure details about each connection such as how long, in seconds, before a connection times out and how many requests each connection can make to the server. More tips on tuning Apache can be found in Chapter 31, 'Performance Tuning.'
Runtime Server Configuration Settings
At this point, the Apache server runs, but perhaps you want to change a behavior, such as the default location of your website's files. This section talks about the basics of configuring the server to work the way you want it to work.
Runtime configurations are stored in just one file — httpd.conf
, which is found under the /etc/httpd/conf
directory. This configuration file can be used to control the default behavior of Apache, such as the web server's base configuration directory (/etc/httpd
), the name of the server's process identification (PID) file (/etc/httpd/run/httpd.pid
), or its response timeout (300 seconds). Apache reads the data from the configuration file when started (or restarted). You can also cause Apache to reload configuration information with the command /etc/rc.d/init.d/httpd reload
, which is necessary after making changes to its configuration file. (You learned how to accomplish this in the earlier section, 'Starting and Stopping Apache.')
Runtime Configuration Directives
You perform runtime configuration of your server with configuration directives, which are commands that set options for the httpd
daemon. The directives are used to tell the server about various options you want to enable, such as the location of files important to the server configuration and operation. Apache supports nearly 300 configuration directives with the following syntax:
Each directive is specified on a single line. See the following sections for some sample directives and how to use them. Some directives set only a value such as a filename, whereas others enable you to specify various options. Some special directives, called <
. Sections usually enclose a group of directives that apply only to the directory specified in the section:
<Directory
</Directory>
All sections are closed with a matching section tag that looks like this: </
. Note that section tags, like any other directives, are specified one per line.
After installing and starting Apache, you'll find an index of directives at http://localhost/manual/mod/directives.html.
Editing httpd.conf
Most of the default settings in the config file are okay to keep, particularly if you've installed the server in a default location and aren't doing anything unusual on your server. In general, if you don't understand what a particular directive is for, you should leave it set to the default value.
The following sections describe some of the configuration file settings you
ServerRoot
The ServerRoot
directive sets the absolute path to your server directory. This directive tells the server where to find all the resources and configuration files. Many of these resources are specified in the configuration files relative to the ServerRoot
directory.