Installing and Configuring a Web Server

Installing and configuring a web server is not much more difficult than installing an FTP server. Once your web server is up and running, other Internet users can view documents you publish on your Linux system.

Configuration

Configuring a web server can be as easy or as difficult as you choose. Like other web servers, Apache provides seemingly countless options. Fortunately, you probably need to set only one option; with luck, you may not need to set even that option. Of course, you can set other options if you like.

Apache’s configuration files reside in the directory /etc/httpd/conf. For historical reasons that no longer apply, Apache has three configuration files:

access.conf

Specifies what hosts and users are allowed access to what documents and services

httpd.conf

Specifies options that govern the operation of the httpd daemon

srm.conf

Specifies how your server’s documents and organized and formatted

Currently, you can place Apache configuration commands in any of these files. However, each of these files must exist, even if it is empty; otherwise, the httpd daemon will refuse to run. As distributed, the files contain a default configuration. Before starting the web server, you should revise the ServerName option of the httpd.conf file. The three following subsections describe other options that you may wish to specify. You can scan them to see what options are available and specify options that interest you. A more complete description ...

Get Learning Red Hat Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.