Step-by-Step Configuration Example

Figure 3.1. Webmin's Main Apache Module Screen

Webmin's Apache module considers all sites hosted on your computer as virtual servers and the default one is your main site. The default configuration of the web server is localized in the Default server entry of the Virtual server section. Click on Default server and you will get a screen which has two main sections. On top, you have the options' icons and at the bottom, the per directory configuration options.

Figure 3.2. Apache' Default Server Configuration Screen

The Networking and addresses section contains some important options. In it, you can specify the webmaster's mail address in the Server admin email address field. To avoid false requests on your web server, configure the following options: Lookup hostnames and Use hostname supplied by browser, respectively to yes and no.

Apache writes errors and accessed pages into a journal. Options in the section Log files manage this journal. The first one, Error log to, allows you to choose between Syslog (the centralized system log), a specific log file or a program. The same is possible for Browser log. You can specify the information format in the log file. If you plan to use a log parser, you must specify the log format that Apache should generate. The last important option, Don't log references from, is useful to avoid some hosts to appear in the log file. For example, if you are accessing your web site from your internal network, you could prefer not to fill the log with those requests.

In the Document options section, specify your site's Document root. This is the path to the directory containing your web pages. User WWW directory specifies the name of the directory in each user account containing user web pages. Moreover, you can restrict this option for some user. Directory options contains common options for your web server, like the ability to execute a CGI program or to follow UNIX symbolic links in a web tree (Execute CGI programs and Follow symbolic links).

Figure 3.3. Document Options Section

If your web site contains some directories, you can specify aliases in the Alias and redirects section. For example, if you have a complex directory tree containing your web pages, you can simplify the navigation by creating aliases. Instead of pointing your browser to http://www.example.com/foo/bar/again/and/more, just use http://www.example.com/morestuff in Document directory aliases. The second part of the screen is dedicated to redirections, which let you redirect a part of your web address to a specific web page or directory.

Figure 3.4. Alias And Redirection Section

If you plan to use Common Gateway Interface programs, the CGI programs section lets you specify which directory contains your CGIs, and configure some variables passed to the executables. The default values allow you to directly use your script in your web site.

If you want to increase security on your site by using cryptography, the SSL options section allows you to enable SSL connections. Sessions opened using SSL will be encrypted, hence secure. You can choose the log file in SSL log file or the protocols with SSL protocols. This choice depends on the clients you will be serving. Moreover, you can indicate to Apache which certificate to use in order to authenticate your site to the client (Certificate/private key file).

Figure 3.5. SSL Options Section

The PHP icon lets you configure specific default PHP values for the site. For example, if you have one PHP script used by many sites, you can differentiate the latter using PHP flags.

Read more about the other icons of this screen in the section called “Advanced Configuration”.

All configuration points we talked about can be accessed through the Show directives section. It presents the part of the Apache configuration file associated with the virtual host. Each link sends you to the appropriate Webmin section in order for you to configure it.

On the other hand, the second section manages your site's directories. As you can see, if you click on one directory name, you can specify the same general options for each directory. For example, you can configure specific Mime Types for your download directory, or specific directories when people request a precise, private directory.

At this point, you can apply any of your changes directly by clicking on Apply Changes link in the top right corner. In the same area, the Stop apache link allows you to stop your web server.


Hosted by Internet News Unlimited