【问题标题】:Error with httpd config on CentosCentos 上的 httpd 配置错误
【发布时间】:2015-02-27 01:31:17
【问题描述】:

当我尝试使用“service httpd restart”重新启动 httpd 时,出现以下错误:

Stopping httpd:                                            [FAILED]
Starting httpd: Syntax error on line 10 of /etc/httpd/conf/extra/httpd-directories.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
                                                           [FAILED]

我正在使用 apache 2.2 运行 Centos 6

我没有对我的 httpd-directories.conf 进行任何更改,并且我读到 Order 是有效的命令,并且我在其他地方的配置可能存在问题,但我不知道去哪里找。有什么建议吗?

我的 httpd-directories.conf 文件的开头:

<Directory />
 Options All
 AllowOverride All
</Directory>

<Directory /home>
 AllowOverride All
 Options -MultiViews -Indexes +FollowSymLinks +IncludesNoExec +Includes
 <Limit GET POST OPTIONS PROPFIND>
  Order allow,deny
  Allow from all
 </Limit>
 <LimitExcept GET POST OPTIONS PROPFIND>
  Order deny,allow
  Deny from all
 </LimitExcept>
</Directory>

【问题讨论】:

  • - 确保在您的配置中加载了“mod_access_compat.so”模块,如下所示:“LoadModule access_compat_module modules/mod_access_compat.so”

标签: apache centos


【解决方案1】:

编辑您的 httpd.conf 并确保已加载 mod_authz_host 模块。

How to enable/install Apache Modules ?

【讨论】:

  • 我在 httpd.conf 中添加了“LoadModule authz_host_module modules/mod_authz_host.so”,现在我收到一个新错误:/etc/httpd/conf/extra/httpd-php 第 2 行的语法错误-handlers.conf:无效命令“AddHandler”,可能拼写错误或由未包含在服务器配置中的模块定义
【解决方案2】:

编辑我的 httpd.conf 不是一个好主意。将此代码添加到我的 httpd.conf 时出现新错误 LoadModule authz_host_module modules/mod_authz_host.so

下面的代码解决了我的问题

cd /usr/local/directadmin/custombuild
./build update
./build apache
./build rewrite_confs

【讨论】:

  • 所以你又禁用了mod_authz_host
猜你喜欢
  • 2016-07-03
  • 2021-02-14
  • 2018-02-01
  • 1970-01-01
  • 1970-01-01
  • 2014-02-15
  • 1970-01-01
  • 1970-01-01
  • 2021-06-08
相关资源
最近更新 更多