Bare minimum Apache modules needed for static website and no authN

apache-http-server

I've just installed the httpd package in RHEL 6.1 (which provides Apache 2.2.15). The default httpd.conf contains no fewer than 50 instances of the LoadModule directive.

However, all I want to do is serve up static content, a Google map or two and some CSS.

Trial-and-error, along with apachectl configtest, leads me to believe that I can get away with only the following modules enabled (given no other changes to the default config file):

mod_authz_host
mod_log_config
mod_mime_magic
mod_setenvif
mod_mime
mod_autoindex
mod_negotiation
mod_dir
mod_alias

Are there modules that should be included in this list for better/safer operation of the server? The official docs seem to indicate that nothing more than mod_dir and mod_mime are absolutely necessary for a barebones site.

Note: I'm not soliciting advice on which HTTP server to use for the indicated task. I'm aware of the existence of "lighter" servers. This question is about Apache modules.

Best Answer

The answer is alluded to in the official 2.2 docs, in the section on performance tuning.

An associated question that arises here is, of course, what modules you need, and which ones you don't. The answer here will, of course, vary from one web site to another. However, the minimal list > of modules which you can get by with tends to include mod_mime, mod_dir, and mod_log_config. mod_log_config is, of course, optional, as you can run a web site without log files. This is, however, not recommended.

Related Question