Advanced Configuration

Webmin's main screen, Apache Module, is composed of many sections. The first, Processes and limits, allows you to tune your Apache server. You can configure the number of initial instances of Apache (Initial server processes and Maximum spare server processes), the header and request line sizes (Maximum headers in request and Maximum request line size) or the number of clients per process (Maximum requests per server process).

Figure 3.6. The Configuration Screen of Apache Processes

The Listen on addresses and port option in the Networking and addresses section could be important for your web server configuration. You can specify the default port Apache listens on for regular and encrypted sessions (by default, 80 and 443, respectively). Multiple requests per connection sets up the number of requests that can be served for a browser, and Keep-alive timeout configures the timeout of web browser requests.

In the Apache modules section, you will find all detected Apache modules. Here, you can select modules you don't want to be loaded by Apache.

The Miscellaneous section contains some useful options. The first one, Core dump directory, configures the directory in which Apache will store its memory dump in the unlikely case of crashing. In the same way, Server lock file and Server PID file specifies, respectively, the lock file and the one containing Apache's UNIX process number. You can configure the HTTP header returned by Apache in the Server HTTP header field and the Server execution mode.

Apache can run in stand-alone mode. If so, it will be launched and wait for connections. Apache can also be launched with the inetd command when a browser sends a request to the computer. Generally, Apache with inetd is used for small web sites.

The next section concerns CGI programs. If you use CGI programs with your web server, you can specify where to put the CGI output log file and its maximum size.

Per-directory options files allows to redefine common options to a particular directory of your web site. Moreover, this file (generally .htaccess) permits to limit access to directories. In this section, select the directory and click on Create options file. You will get a new page with many icons, similar to the common configuration pages. Here, you can specify some default values for PHP (click on the PHP icon), some access restrictions by user or group (click on the Access control icon) or configure the directory listing format (click on Directory indexing icon).

Figure 3.7. Directory Limitations Using .htaccess

The Re-configure known modules section contains a list of possible installed Apache modules. Webmin tries to find automatically which ones are installed, but you can configure them by hand in this section.

The Edit defined parameters section enables to modify the parameters passed to Apache when the server is launched.

Using the Virtual servers section, you can set up a multi-domain web server. For example, your company owns foo.com and bar.net. With virtual servers, you can handle the two domains with one computer and one Apache server. You just have to specify the IP address and eventually the server's port number, the document root, where your site's files are stored, and the name of the virtual server. If you are managing multiple sites, you can copy configuration directives from other virtual servers. This can save you lots of time.

For each site represented by a virtual server, you have other options. In the Processes and limits section, you will find options to limit system resources. You can set up the memory, CPU and process resources limit to prevent the system to fall down because of misbehaving clients. The Error handling section enables to specify which web page is called if a specific error appears during the request treatment. For example, if Apache cannot find a requested web page, it displays a 404 error. The User and group icon allows you to specify which user owns the Apache processes corresponding to the current virtual server.

The MIME types take care of file associations and char sets in Apache. You can set up which command will be executed when a request is made for certain file types. In the same way, you can tell Apache how to find multi-lingual pages. If you have many sites, you can tell it to change the owner of the processes to the values you set. The icon Directory indexing allows you to do so. If you want to create a cache server for some web pages, the Proxying section contain some options which will help you out.


Hosted by Internet News Unlimited