Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have the following list of modules in my Apache httpd installation by default, but I'm pretty sure that I don't need (at least) a few of them. So, my question is what are the Necessary modules for Apache httpd to work properly?

I'm running a LAMP server on a CentOS 6, running only a website (SaaS), nothing more. So, I'm looking to load only the truly necessary modules.

Here is the loaded modules on my installation by default:

auth_basic_module
auth_digest_module
authn_file_module
authn_alias_module
authn_anon_module
authn_dbm_module
authn_default_module
authz_host_module
authz_user_module
authz_owner_module
authz_groupfile_module
authz_dbm_module
authz_default_module
ldap_module
authnz_ldap_module
include_module
log_config_module
logio_module
env_module
ext_filter_module
mime_magic_module
expires_module
deflate_module
headers_module
usertrack_module
setenvif_module
mime_module
dav_module
status_module
autoindex_module
info_module
dav_fs_module
vhost_alias_module
negotiation_module
dir_module
actions_module
speling_module
userdir_module
alias_module
substitute_module
rewrite_module
proxy_module
proxy_balancer_module
proxy_ftp_module
proxy_http_module
proxy_ajp_module
proxy_connect_module
cache_module
suexec_module
disk_cache_module
cgi_module
version_module

As a Hint, again I'm not looking for a specific answer regarding to my machine's configuration. I want to know which modules are primary for Apache httpd?

share|improve this question

closed as not constructive by mgorven, Ladadadada, Dave M, Michael Hampton, mdpc Feb 13 '13 at 0:09

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
There is no way for anyone to answer what is "truly necessary" -- everyone's definition will be different. For example, I have no use for mod_speling or mod_userdir, but I could not live without mod_status output. The only way to answer your question is "You need all the modules your system uses to serve requests" –  voretaq7 Feb 12 '13 at 17:38
    
@voretaq7 thanks for the comment, but I can't believe that there is no way to answer this question. If all the modules are optional, so the answer is you can unload all the modules. If there is module X that if you unload it, you will face some major or minor issues, like security or performance related stuff, then, I'd say those are necessary for httpd. –  Mahdi Feb 12 '13 at 18:54

1 Answer 1

Yes, CentOS 6 has quite long list of Apache2 modules installed by default. I found that many of them are not necessary (at least for applications that I host).

In general I like to start with modules that Debian distro loads by default (which is much shorter than this from CentOS):

core_module (static)

log_config_module (static)

logio_module (static)

mpm_prefork_module (static)

http_module (static)

so_module (static)

alias_module (shared)

auth_basic_module (shared)

authn_file_module (shared)

authz_default_module (shared)

authz_groupfile_module (shared)

authz_host_module (shared)

authz_user_module (shared)

autoindex_module (shared)

cgi_module (shared)

deflate_module (shared)

dir_module (shared)

env_module (shared)

mime_module (shared)

negotiation_module (shared)

perl_module (shared)

php5_module (shared)

python_module (shared)

reqtimeout_module (shared)

rewrite_module (shared)

setenvif_module (shared)

status_module (shared)

and then unload those that are unecessary for me:

perl_module

python_module

cgi_module

autoindex_module

and one that should be loaded only for troubleshooting/tunning Apache:

status_module

Also I suspect that following modules are unnecessary for me but I'm not 100% sure (I would have to check) so I keep them for now:

reqtimeout_module

negotation_module

dir_module

It is also interesting to investigate with this script how unloading modules affects memory consumption by the Apache.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.