29.2. The Apache Webserver Module

This is one of the most complex and powerful Webmin modules, as it allows you to configure almost every feature of Apache. It can determine the version of Apache that is installed on your system and the modules that it uses, and adjusts its user interface accordingly so that you can edit only those directives that the web server understands. The interface, however, is generally the same for all versions of Apache.

Because there are so many directives and the module attempts to allow configuration of all of them, it groups directives into categories like Processes and Limits, Networking and Addresses, and CGI Programs. These categories are represented by icons that will appear when you open a virtual server, directory or options file in the module. In all cases, you can view and edit the settings under each category by clicking on its icon.

Apache has a large number of standard modules and an even larger number of separate modules that were developed by other people. Webmin does not support the editing of directives in most of these non-standard modules, such as mod_perl and mod_php. It will safely ignore any configuration file directive that it does not understand, however, so any settings for unsupported modules that you make manually will not be harmed.

The Apache Webserver module can be found under the Servers category on the Webmin main menu. When you enter it for the first time the main page will display a list of all Apache modules that it knows how to configure, with those available on your system selected. Figure 29.1 shows an example of this.

Figure 29.1. Selecting available Apache modules.


In almost every case, the default selections will be correct for your system and you can just click the Configure button to begin using the module. If, however, you have a complex Apache configuration file that Webmin cannot parse properly to find dynamically loaded modules, the default selections may be incorrect. If so, you will need to change them so that the module does not attempt to set directives that are not supported on your system.

Once you have submitted the module configuration form, the main page will be redisplayed as shown in Figure 29.2. From this point on, this page will be displayed immediately whenever you enter the module, unless Webmin detects that a new version of Apache has been installed on your system.

Figure 29.2. The Apache Webserver module main page.


At the top of the main page are icons for the various categories of global options, as well as a few extra features. Below them is a list of all current virtual servers, followed by a form for adding a new virtual host. If you have a very large number of virtual servers on your system (more than 100 by default) a search form for finding servers will be displayed instead. The first server will always be the special Default Server, which contains directives that apply to all other virtual servers and handles requests that other servers do not.

Naturally, the Apache module will not work if you do not have Apache installed on your system. If this is the case, the main page will display an error message instead of the module configuration form or list of virtual servers. All Linux distributions include a package or packages for it on their CD-ROM or website, so install it from there using the Software Packages module (covered in Chapter 12) before continuing.

Because the module assumes that the Apache executable and configuration files will be in the locations used by your distribution's package, it will report the same error about the software not being installed if you have compiled and installed it manually. If this is the case, click on the Module Config link and adjust the paths to the correct locations for your system. The instructions in Section 29.22 “Configuring the Apache Webserver Module” explain how to do this in more detail.

On versions of UNIX that do not include Apache by default, Webmin assumes that it will be installed from the standard source distribution at www.apache.org. If you have installed the web server from an optional package that has been made available for your OS, then the main page will complain that it is not installed and you will need to adjust the module's configuration.

The module's user interface is quite complex and has a large number of pages, forms, and sub-pages due to the complexity and power of the Apache configuration files. There are, however, elements of the interface that are repeated on many pages throughout the module, such as:

Category icons When you click on the icon for a virtual server, directory, or options file, a table of icons with names like MIME Types and CGI Programs is displayed at the top of the page. Under each of these icons are fields and tables for configuring options related to the label of the icon they are under. This commonly used layout breaks down the vast number of editable Apache options into categories, as there are far too many fields to display on a single page. The exact icons that appear and the fields under them differ depending on the part of the web server configuration you are editing, and the version of Apache that is installed. Their basic layout, however, is always the same.

Tables fields On many forms, some fields use tables for entering multiple values such as MIME types and their associated file extensions. There is no limit on how many rows each table can have, but Webmin will only display a single empty row in each table at any one time. This keeps down the size of forms that have lots of tables, but means that you can only add one new row to a table at a time. To add more than one, you will need to save the form and then re-enter it, which will cause a new blank row to be displayed below the one you just filled in.

The following sections explain in more detail exactly which icons to click and which tables to fill in when you are doing things like enabling CGI scripts and setting MIME types.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.109.235