Thursday, July 23, 2009

Debian / Ubuntu Linux enable/disable an apache module (simple way)

Debian / Ubuntu Linux comes with two scripts:

(a) a2enmod is a script that enables the specified module within the apache2 configuration. It does this by creating symlinks within /etc/apache2/mods-enabled.

(b) a2dismod disables a module by removing those symlinks. It is not an error to enable a module which is already enabled, or to disable one which is already disabled.

Syntax:
a2dismod {module-name}

For example disable a module called foo or mime_magic, enter:


# a2dismod foo
# a2dismod mime_magic

If you ever need to re-enable disabled modules, use a2enmod command as follows:

Syntax:
a2enmod {module-name}

For example, enable imagemap module, enter:
# a2enmod imagemap

Note if don't know module name, it will show a list of all available modules:
# a2enmod

----------------------------
Which module would you like to disable?
Your choices are: alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex cgi dir env fastcgi mime negotiation php5 setenvif status userdir
Module name? authz_user
----------------------------

No comments:

Post a Comment

tag ur valuable ideas below