Which Apache2 modules can I safely disable?

Viewed 17543

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.

6 Answers

I created a small python script to help you with it. Please have a look at https://github.com/zioalex/unused_apache_modules

This is what you can expect from it:

curl http://localhost/server-info > http_modules_test.txt
cat http_modules_test.txt| python find_unused_apache_mod.py

1
Module name mod_python.c
Configuration Phase Participation: 4
Request Phase Participation: 11
Current Configuration: 3

2
Module name mod_version.c
Configuration Phase Participation: 0
Request Phase Participation: 0
Current Configuration: 1

3
Module name mod_proxy_connect.c
Configuration Phase Participation: 0
Request Phase Participation: 0
Current Configuration: 0

To remove safely:
 ['mod_proxy_connect.c']
POPPED:  mod_proxy_connect.c

To KEEP:  ['mod_python.c', 'mod_version.c', 'mod_proxy_connect.c']
Related