【问题标题】:Error after Install mod_headers and restart apache安装 mod_headers 并重新启动 apache 后出错
【发布时间】:2014-07-08 12:13:26
【问题描述】:
sudo a2enmod headers

Enabling module headers.
To activate the new configuration, you need to run:
  service apache2 restart
root@example:~# service apache2 restart
 * Restarting web server apache2                                                                                                                                 [fail]
 * The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 38 of /etc/apache2/apache2.conf:
Argument for 'Require all' must be 'granted' or 'denied'
Action 'configtest' failed.
The Apache error log may have more information.

错误日志

01:30:26.678410 2014] [core:alert] [pid 5711] [client myid:15424] /var/www/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jul 08 01:30:39.256270 2014] [core:alert] [pid 5722] [client myid:31850] /var/www/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jul 08 01:36:12.821198 2014] [core:alert] [pid 5710] [client myid:21182] /var/www/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jul 08 01:48:08.278465 2014] [mpm_prefork:notice] [pid 5705] AH00169: caught SIGTERM, shutting down

【问题讨论】:

  • 向我们展示您的 apache2.conf?告诉我们您正在运行的具体 Apache 版本是什么?

标签: php linux apache .htaccess ubuntu


【解决方案1】:

如果您的 apache 配置有以下行

Require all granted # new config style (replaces both rules above)

改成

Require all granted

然后重启 apache。

【讨论】:

    猜你喜欢
    • 2011-05-08
    • 2017-05-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-11
    • 1970-01-01
    • 1970-01-01
    • 2023-03-28
    相关资源
    最近更新 更多