Apache启动错误:Invalid command 'Order'

来源:互联网 发布:软件测试学linux 编辑:程序博客网 时间:2024/06/02 04:28

启动Apache httpd服务时,报错:

Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration


原因可能是没有加载相应的apache模块,在httpd.conf中添加如下指令可以规避该问题:

LoadModule authz_host_module modules/mod_authz_host.so


也可能是Apache编译时选择了只是支持加载共享模块的模式(--enable-so),单独编译共享模块,通过配置指令LoadModule进行动态加载。

一个个查找并加载这些模块比较麻烦,可以编译一个静态链接各内置模块的httpd版本,然后替换掉原来的/usr/sbin/httpd程序,

这样不会出现类似Invalid command 'Order', Invalid command 'AddType'这样的错误。当然多进程时,共享模块可节约内存。


参考阅读:

http://stackoverflow.com/questions/37069/apache-how-do-i-build-individual-and-or-all-modules-as-shared-modules



0 0