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, Debian GNU/Linux automatically configures Apache when you install it. However, the configuration options selected by the install scripts may not suit your needs. In that case, you can modify the configuration files.

Apache’s configuration files reside in the directory /etc/apache. 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 ...

Get Learning Debian GNU/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.