How can I disable unneeded modules in Apache?

Updated

When Red Hat Enterprise Llinux is installed with Apache, often times there are extra modules installed that may not be used by the system but consumes memory on the system. They are regulated by the configuration files (.conf) in /etc/httpd/conf.d/. It would look similar to:

[root@redherring conf.d]# ls
manual.conf php.conf README webalizer.conf
perl.conf python.conf ssl.conf welcome.conf

Apache scans for files with the .conf suffix at start up. For example, if the system does not need to use mod_python, rename 'python.conf' to 'python.bak' and restart Apache with the command 'service httpd restart in order to disable that particular module and save memory. If the system does not need to use SSL or mod_perl, do the same with ssl.conf and perl.conf, respectively.

If it ever becomes necessary to re-enable these modules, simply rename them to their original names and restart Apache to regain their previous functionality.

Article Type