Thursday, July 23, 2009

CentOS / Redhat (RHEL) / Fedora Linux enable/disable an apache module

Under Redhat based Linux distributions you need to modify *.conf file stored in /etc/httpd/conf.d/ directory. Apache scans for files with the .conf suffix at start up.

So 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.


# cd /etc/httpd/conf.d/
# mv perl.conf no.perl.bak
# /etc/init.d/httpd

Enable a Module

To re-enable modules, simply rename them to their original names and restart Apache to get back module functionality:


# cd /etc/httpd/conf.d/
# mv no.perl.bak perl.conf
# /etc/init.d/httpd


More about /etc/httpd/httpd.conf directory

This directory holds Apache 2.0 module-specific configuration files; any files in this directory which have the ".conf" extension will be processed as Apache configuration files. Files are processed in alphabetical order, so if using configuration directives which depend on, say, mod_perl being loaded, ensure that
these are placed in a filename later in the sort order than "perl.conf".

  • manual.conf : This configuration file allows the manual to be accessed at http://localhost/manual/
  • perl.conf : mod_perl incorporates a Perl interpreter into the Apache web server, so that the Apache web server can directly execute Perl code.
  • php.conf : php5 module for php
  • proxy_ajp.conf : When loaded, the mod_proxy_ajp module adds support for proxying to an AJP/1.3 backend server such as Tomcat.
  • python.conf : mod_python is a module that embeds the Python language interpreter within the server, allowing Apache handlers to be written in Python.
  • squid.conf : Access to squid cache manager
  • ssl.conf : Apache SSL server configuration
  • webalizer.conf : Webalizer stats configuration
  • welcome.conf : This configuration file enables the default "Welcome" page if there is no default index page present for
    the root URL.

No comments:

Post a Comment

tag ur valuable ideas below