【发布时间】: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