【问题标题】:How to fix Apache 2.4 Require not allow here when starting如何修复 Apache 2.4 启动时要求此处不允许
【发布时间】:2020-09-20 13:51:00
【问题描述】:

启动 apache 2.4 时出现以下错误。

httpd[11435]: AH00526: Syntax error on line 22 of /etc/httpd/conf.d/vhost1.conf:
httpd[11435]: Require not allowed here

以下行导致 vhost1.conf 中出现此错误

<VirtualHost myserver:80>
    DocumentRoot "/var/www/html"
    Require all granted
</VirtualHost>
<VirtualHost myserver:443>
    DocumentRoot "/var/www/html"
    Require all granted
</VirtualHost>

这有什么问题?我该如何解决这个错误?

【问题讨论】:

    标签: apache apache2 httpd.conf apache2.4


    【解决方案1】:

    您需要在目录中使用 Require。即

    <Directory "/var/www/html">
        Require all granted
    <Directory>
    

    【讨论】:

      猜你喜欢
      • 2015-10-06
      • 1970-01-01
      • 2018-02-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-24
      • 2015-06-04
      • 2019-12-30
      相关资源
      最近更新 更多