在 CentOS 系统中,Apache HTTP 服务器的模块可以通过以下步骤启用:
sudo yum install httpd
sudo systemctl start httpd
sudo systemctl enable httpd
/usr/lib64/httpd/modules
或 /etc/httpd/modules
目录中。使用 ls
命令查看模块列表:ls /usr/lib64/httpd/modules
a2enmod
命令启用模块。例如,如果要启用 mod_rewrite
模块,请运行:sudo a2enmod rewrite
sudo systemctl reload httpd
现在,所选模块已启用并正在运行。可以通过访问 Apache 的错误日志文件(通常位于 /var/log/httpd/error_log
)来验证模块是否已正确加载。