大网数据广告活动
服务器运维问答

How to check if mod_alias is enabled?

· 52CE 我爱测

I want to try mod_alias instead of mod_rewrite for a couple of simple redirect rules, but the directives don't seem to be working when entered in .htaccess . Is it possible that mod_alias is not loaded or enabled on the server? H…

问题原文

原帖链接 · Matthew S · CC BY-SA 3.0

I want to try mod_alias instead of mod_rewrite for a couple of simple redirect rules, but the directives don't seem to be working when entered in .htaccess. Is it possible that mod_alias is not loaded or enabled on the server?

How do I find out?

社区高分解答

原帖链接 · Theofilos Papapanagiotou · CC BY-SA 4.0

You can check if mod_alias is enabled by using the following command:

~$ apache2ctl -M | grep alias

If it's enabled, it will give you the following response:

 alias_module (shared)
Syntax OK

You can also check manually the file which is loading the module:

~$ cat /etc/apache2/mods-enabled/alias.load 

If it's enabled, it will give you the following response:

LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-01-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。