a2dismod
Disable Apache modules
TLDR
Disable a module
Don't show informative messages
SYNOPSIS
a2dismod [-q|--quiet] <module> [<module> ...]
PARAMETERS
-q, --quiet
Quiet mode: suppress output about removed symlinks
<module>
Name of module(s) to disable (e.g., rewrite, ssl)
DESCRIPTION
The a2dismod command is a helper script in Debian-based Linux distributions (like Ubuntu) for disabling Apache2 modules. It removes symbolic links from /etc/apache2/mods-enabled/ to the module files in /etc/apache2/mods-available/, preventing the module from loading on Apache restart.
This simplifies module management without manual symlink editing. For example, disabling the rewrite module stops URL rewriting. Run as root or with sudo: a2dismod rewrite. It supports multiple modules at once and warns if a module is already disabled or missing.
After running, reload Apache: systemctl reload apache2 (systemd) or service apache2 reload. Part of the apache2 package, it's ideal for toggling features like SSL, CGI, or proxy without config file changes. Ensures clean, reversible disabling.
CAVEATS
Requires root privileges. Changes ineffective until Apache reload. Warns if module not enabled or absent; does not delete files.
EXAMPLE
sudo a2dismod ssl rewrite
Disables SSL and rewrite modules.
POST-COMMAND
Run systemctl reload apache2 to apply changes.
HISTORY
Developed by Debian Apache Maintainers for Apache2 packaging. Introduced around 2004 with Debian's Apache 2.0 transition for easy mod management.


