0

/etc/apache2/apache2.conf我取消注释以下行:

# ErrorLog ${APACHE_LOG_DIR}/error.log

结果如下:

serv:/var/log/apache2# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting (2)No such file or directory: apache2: could not open error log file /etc/apache2/logs/error_log.
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
 failed!

如何禁用不包含 ErrorLog/CustomLog 指令的虚拟主机的错误日志记录?

4

2 回答 2

0

如您所见,apache 无法打开日志文件。在这种情况下,您必须更改

/etc/apache2/apache2.conf

/etc/apache2/${APACHE_LOG_DIR}/error.log

这个决议可以在说明 apache ubuntu 论坛中看到。

于 2013-03-08T13:32:37.060 回答
0

尝试使用以下命令启动 apache

service apache2 start
于 2013-11-12T06:31:00.587 回答