Chapter 4: Web Server Options Up Part I: Fundamental Webserver Management with InterWorx Chapter 6: Default Sites for each IP address 

5 Apache Modules

This lists the Apache modules installed on the server and their status. It also allows you to enable, disable and remove Apache modules from the webserver configuration. Here we will cover the purpose of the modules that ship with a default InterWorx install. Most modules are not readily used by the default system configuration, but are provided such that SiteWorx users are able to use the module’s directives locally to their site in .htaccess files.
allows you to set certain actions to occur when a given MIME content type is requested with the Action directive. For example, you could have a CGI script execute everytime a GIF image is requested. Additionally, you can use the Script directive to override the default handling of certain HTTP requests (GET/HEAD/POST) and have a script execute instead.
allows you to map different URLs to different parts of the filesystem, possibly outside the docroot of the account. For example, you can make it so anything requested from loads from /mnt/disk2/files. In addition, you can do simple redirects when certain resources are requested.
allows you to send data to the HTTP client sans the normal HTTP headers that are included with a server response. This means in order to conform to the HTTP protocol, the file being served must include HTTP headers itself or the browser will be unable to process the server’s response. Useful if you want to server flat files with headers embeded in them already. The server will add a Date: and Server: header to the response.
This module allows you to restrict access to content. It’s sole purpose is to act as a front-end configuration for dictating which URL’s are restricted and how they are restricted, while actual authentication is handled by another module.
provides flat-file authentication to the authn_basic_module. Essentially this is when you have a .htpasswd file with username, colon, and encrypted password. Typically this file is used in conjunction with the htpasswd command to generate users and encrypted passwords on the fly.
allows you to specify groups of users in a flat file, and then grant authentication to users based on what group they are in.
allows you to allow and deny access based on host. This is heavily used across the webserver configuration to limit certain parts of the filesystem and virtual pages to only specific clients, notably the localhost server. The directives are the popular Allow From and Deny From.
allows you to restrict certain URLS to specific users, or require a valid-user to log in.
is the module responsible for creating directory listings when a user visits a directory on the server that does not contain an index.html or index.php. This module allows apache to generate a directory listing on the fly, possibly excluding hidden files and also inserting or appending code to make the generated page look nice.
is a module which allows fine-grained control over the sever-side caching of content that is frequently accessed. The cache module integrates with disk_cache_module and mem_cache_module to provide 2 different caching abilities to the website administrator for caching.
is a module that is primarily used by the CERN community to add additional meta headers to an HTTP response that are CERN-specific. This allows Apache to emulate CERN HTTPD file semantics.
allows for the execution of CGI scripts for files that have the handler cgi-script. CGI scripts essentially recieve web-server data as part of their environment variables and POST data as part of their stdin input. They return data as part of their stdout output back to the webserver which the server sends back to the user.
is a CGI module designed for a multi-threaded MPM such as worker. Instead of forking a multi-threaded Apache process which is very expensive, a daemon standsby which is what is used to fork and execute external CGI scripts. This is probably not going to be used by your server.
provides WebDAV or Web-based Distributed Authoring and Versioning for Apache. This essentially provides some sort of versioning system in Apache using the HTTP protocol by creating, moving, copying and deleting resources with HTTP requests specific to WebDAV.
is a module responsible for interacting with dav_module and providing filesystem-resources to that module. This is a support module.
provides compression utility support to Apache such that files can be compressed before being sent over the network to the client.
is the module that controls what the index file of a directory is (typically index.html or index.php). In addition it allows autoindex_module to be used in place where a specific index file is not user-defined.
is a support module for cache_module that provides disk-based caching. This may sound like a bad idea, but if processing needs to occur on files per-request basis, the cache can store a processed version of a file and serve that as opposed to re-doing expensive processing. In addition, the operating system and filesystem cache often used files in memory to speed up access. Therefore, a heavily used disk cache is probably being serviced from system memory more often than the actual secondary storage.
is a module which allows you to manipulate the system environment variables the httpd process is running with. In addition it allows you to control what environment variables are passed to CGI scripts which are executed.
works in conjunction with Cache-Control HTTP header to tell the client-side browser when content should be retrieved from the server again as opposed to being loaded from the browser cache. Allows web developers to have control over how long a client-side browser caches images and scripts from the Apache server.
allows you to run a program to filter input and ouput in and out of the webserver. This allows you to add filters just by making a program that accepts arbitrary outgoing HTML in a program’s stdin input, applying some text manipulations, and sending the webserver your filtered output via stdout. This could be used to, for example, append advertisements to all HTML coming out of your server for a free webhosting service.
is the module that provides the ability to control and manipulate HTTP request and response headers.
according to Apache’s documentation:
This module provides a filter which will process files before they are sent to the client. The processing is controlled by specially formatted SGML comments, referred to as elements. These elements allow conditional text, the inclusion of other files or programs, as well as the setting and printing of environment variables.
This essentially allows for config-level filtering of content without having to explicitly write an external program to apply text transformations.
is the module that provides the Apache /server-info page. This module can be used to provide information about your server from an HTTP-accesible web page.
is the module which allows you to configure the output format of the logs, where they are stored, and what kind of information they contain. This is used heavily by the default InterWorx configuration to control where logs live for each SiteWorx account.
is a support module for mod_cache. This module provides support for in-memory caches for Apache. According to the Apache documentation, mod_disk_cache is preferred as this cache will actually be per-process which is not idea for the prefork MPM.
This module is responsible for determining the content type of a file, much like the file command of the unix operating system. It reads the first bytes of a file and looks at magic numbers to try and determine what kind of file is being opened.
is the module which links a file’s filename (with extension) to meta information about the file - such as what it’s character set is, what it’s encoding is, what language it’s in, etc. This module can also add handlers and filters to specific mime types based on filename extension.
is a content-negotation module that is used to select a document that best matches the capability of a client browser from several available documents. It has a couple different ways to implement content negotation. The documentation is much more verbose regarding the use of this module.
This module implements proxy/gateway features for Apache. It allows the server to connect to another HTTP or FTP server and relay requests on the behalf of the HTTP client, acting as a middle man. Each type of service it can connect to and all proxying features are for the most part added by additional support modules.
is the support module for proxy_module that provides support for the CONNECT HTTP method, mainly used to tunnel SSL requests through proxy servers.
The support module that provides proxy module support for the FTP protocol.
The support module that provides HTTP and HTTPS support for the proxy module.
The rewrite module is the bread-and-butter module for doing redirects. It is capable of usic PCRE-compatible regular expressions to parse URL strings and selectively apply rewrites or redirects. This module is also critical for InterWorx configuration purposes, as well as most WordPress installs.
is a module which allows the setting of specific environment variables based on certain conditions, such as the detected browser. This can be helpful for web applications and CGI scripts.
This module attempts to counter-act spelling mistakes made in the HTTP request from the client browser. It is most commonly used to correct capitalization issues so that URL’s are case insensitive.
This module provides the /server-status status page which lists number of working requests, the number of worker processes, the status of each process, etc.
With suEXEC support, this module allows apache to execute CGI scripts as a specific user and group (which is necessary in InterWorx).
This module allows for a unique ID to be associated with each request, across all requests. This might be useful for debugging, or other purposes where similar requests need to be differentiated.
This module allows the SiteWorx sites to be accessed via http://<server IP>/~<linux user>, which is useful in the event that DNS is not setup for a given SiteWorx account.
This module allows for you to generate a log of user activity on a site that uses cookies. Essentially, usertrack is a user tracking module while they are on a given site.
From the Apache documentation:
This module creates dynamically configured virtual hosts, by allowing the IP address and/or the Host: header of the HTTP request to be used as part of the pathname to determine what files to serve. This allows for easy use of a huge number of virtual hosts with similar configurations.
Some of this modules directives appear in InterWorx’s VirtualHost configurations.
 Chapter 4: Web Server Options Up Part I: Fundamental Webserver Management with InterWorx Chapter 6: Default Sites for each IP address 

(C) 2019 by InterWorx LLC