linux - 无效命令 ‘Order’ ,可能拼写错误或由未包含在服务器配置中的模块定义失败

当我尝试启动或重新启动我的 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/

相关文章:

linux - 一个 C hello world 的汇编输出的每一行是什么意思?

linux - 如何在 Linux Shell 脚本中检查组是否存在并添加是否不存在

linux - PHP CURL 启用 Linux

linux - 如何在 Linux 上安装 Node 二进制分发文件

c - 从命令行将参数传递给 C 程序

linux - 比较linux中两个未排序的列表,列出第二个文件中的唯一性

linux - 试运行 cron 条目

linux - 使用 Bash 查找和复制文件

linux - 向 unix shell 变量添加换行符

python - 如何在python中检索进程开始时间(或正常运行时间)