Linux command
a2enmod 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Enable
sudo a2enmod [module]
Enable
sudo a2enmod [module] && sudo systemctl reload apache2
Enable the rewrite
sudo a2enmod rewrite
Enable SSL
sudo a2enmod ssl
Example
sudo a2enmod -q [module]
说明
a2enmod is a Debian-specific utility that enables Apache2 modules by creating symbolic links in /etc/apache2/mods-enabled pointing to module files in /etc/apache2/mods-available. The tool handles both .load and associated .conf files for each module. The tool works alongside a2dismod, which disables modules. After enabling a module, Apache must be restarted or reloaded for changes to take effect.
参数
- -q, --quiet
- Don't show informative messages
- -m, --maintmode
- Enables maintainer mode; the program invocation is effectuated automatically by a maintainer script
FAQ
What is the a2enmod command used for?
a2enmod is a Debian-specific utility that enables Apache2 modules by creating symbolic links in /etc/apache2/mods-enabled pointing to module files in /etc/apache2/mods-available. The tool handles both .load and associated .conf files for each module. The tool works alongside a2dismod, which disables modules. After enabling a module, Apache must be restarted or reloaded for changes to take effect.
How do I run a basic a2enmod example?
Run `sudo a2enmod [module]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -q, --quiet do in a2enmod?
Don't show informative messages