Tuesday, March 3, 2009

How to enable/disable apache module in Debian/Ubuntu

To enable any module e.g SSL use a2enmod command


root@fizaan:/etc/apache2# a2enmod
Which module would you like to enable?
Your choices are: actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authnz_ldap authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgid cgi charset_lite dav_fs dav dav_lock dbd deflate dir disk_cache dump_io env expires ext_filter file_cache filter headers ident imagemap include info ldap log_forensic mem_cache mime mime_magic negotiation php5 proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy rewrite setenvif speling ssl status substitute suexec unique_id userdir usertrack version vhost_alias
Module name? ssl
Module ssl installed; run /etc/init.d/apache2 force-reload to enable.

Reload the configuration

root@fizaan:/etc/apache2# /etc/init.d/apache2 force-reload
* Reloading web server config apache2root@fizaan:/etc/apache2#

Restart the apach2 web server

root@fizaan:/etc/apache2# /etc/init.d/apache2 restart

To Disable the module use a2dismod command

root@fizaan:/etc/apache2# a2dismod
Which module would you like to disable?
Your choices are: alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex cgid dir env mime negotiation setenvif ssl status
Module name?

Rest of steps are same,force reload and restart apache2.

No comments: