当我试图重新加载Apache2错误消息时,Apache2无法工作。我对服务器非常陌生,apache2请您帮助运行Apache2。下面是错误代码。
:/etc/apache2/sites-available# sudo service apache2 reload
* Reloading web server apache2 *
* The apache2 configtest failed. Not doing anything.
Output of config test was:
(20)Not a directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
(20)Not a directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost define d at /etc/apache2/sites-enabled/test.conf:1
(20)Not a directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost define d at /etc/apache2/sites-enabled/000-default.conf:1
AH00014: Configuration check failed
Action 'configtest' failed.
The Apache error log may have more information.发布于 2017-01-04 13:25:03
(20)Not a directory: AH02291: Cannot access directory '/var/log/apache2/' 检查/var/log/apache2目录是否存在,并且Apache对其具有读写访问权限。
发布于 2017-01-04 13:26:53
如果没有文件夹,/var/log/apache2/将无法在那里写入日志。
因此,首先创建mkdir /var/log/apache2,或者将apache.conf中的日志文件夹更改为不同的内容。
确保权限也是正确的。chmod 750 /var/log/apache2
https://askubuntu.com/questions/867918
复制相似问题