检查Apache是​​否加载了特定的配置?


12

有许多配置文件,我放置了一个文件,但看不到它的影响。

我的配置错误,或者Apache未加载配置文件。

我是否可以执行命令以查看是否由Apache加载了特定的配置文件?

apachectl configtest

不打印错误。服务器重新启动,没有错误。

Answers:


17

您还可以从命令行通过Apache二进制文件运行以下参数以获取其他信息:

-t -D DUMP_VHOSTS  : show parsed vhost settings
-t -D DUMP_RUN_CFG : show parsed run settings
-t -D DUMP_MODULES : show all loaded modules

希望这可以帮助!


7

如果您激活了mod_info模块,只需访问

http://[you server's IP]/server-info

在那里,您将看到整个Apache配置。


1
info_module和一个404的地址结果,我认为您的解决方案通常工作,但不是在我的情况..
丹尼尔W.

3
@DanFromGermany确保您还根据该链接配置了适当的处理程序。如果得到404,则表示Apache不会将其视为mod_info请求,而是常规请求。
Mxx 2014年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.