当我尝试启动或重新启动我的 apache 服务器时,我收到以下消息:
Syntax error on line 162 of /etc/apache2/apache2.conf: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information. failed!
我尝试在谷歌上找到这个错误并修复它:
http://linuxindetails.wordpress.com/2009/12/02/invalid-command-order-perhaps-misspelled-or-defined-by-a-module-not-included-in-the-server-configuration-failed/
我得到错误:
Module authz_host does not exist!
那么,有人帮我修复它吗?
最佳答案
我刚刚从 openSUSE 13.2 升级到 openSUSE Leap 42.1 时遇到了同样的问题。
问题不是 apache2 配置中缺少模块。
问题是从 apache 2.2 升级到 apache 2.4。 “Order”和“Allow”必须改写如下(示例):
在 2.2 中:
Order allow,deny
Allow from all
在 2.4 中:
Require all granted
您可以在此处找到更多选项和示例: Upgrading apache2
关于linux - 无效命令 ‘Order’ ,可能拼写错误或由未包含在服务器配置中的模块定义失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10925528/