Which Apache2 modules can I safely disable?

gregghz picture gregghz · Oct 10, 2010 · Viewed 16.8k times · Source

These are my enabled mods:

alias auth_basic authz_default authz_groupfile authz_host authz_user autoindex deflate dir env mime negotiation php5 reqtimeout rewrite setenvif status

I'm attempting to reduce Apache's memory footprint as much as possible.

Can anyone guide me in the right direction as to which of these I absolutely need and which are optional? I plan on running Symfony, but I couldn't find any requirements about symfony to get it all working.

Answer

Isaac picture Isaac · Oct 10, 2010

Well, you can start by disabling all auth / authz modules, unless you're going to have Apache do authentication work for you, in which case only enable the auth module that you're actually going to use.

You may not really need the autoindex module; you only need it if you'd like Apache to generate index files automatically.

deflate — you actually want that, so Apache can gzip-compress data before sending back to the client (dramatically reduces traffic).

reqtimeout — that's experimental. Not sure if you included it intentionally or not.