Enable an Apache module and reload the configuration
enable mod_rewrite debian | enable mod_headers apache | a2enmod headers | turn on apache module ubuntu | a2enmod | modules | systemctlCaution: This command changes the system. Understand what it does before you run it.
a2enmod headers && apache2ctl configtest && systemctl reload apache2a2enmod creates the required symlinks under /etc/apache2/mods-enabled/, then Apache is reloaded. Chaining with && ensures the reload only happens if the configuration test succeeds. The module name is given without mod_, so rewrite, headers or expires.
Note: On Plesk, toggle modules under Tools & Settings, Apache Web Server instead, so Plesk does not overwrite the setting during the next reconfiguration.
Also searched as
- enable mod_rewrite debian
- enable mod_headers apache
- a2enmod headers
- turn on apache module ubuntu