简体   繁体   English

Apache2不记录错误

[英]Apache2 does not log errors

I have a challenge which hopefully can conquered with the help of the SO community... 我有一个挑战,希望可以在SO社区的帮助下克服...

My apache server will not log errors, PHP nor HTTP. 我的apache服务器不会记录错误,PHP或HTTP。

Here is the config to one of my sites: 这是我的一个站点的配置:

<VirtualHost *:80>
ServerName website
ServerAdmin webmaster@website.com

DocumentRoot /var/www/website
<Directory /var/www/website>
    Options FollowSymLinks MultiViews
    AllowOverride ALL
    Order allow,deny
    allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/website.error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/website.access.log combined

It was all working before but now it doesn't log, I've tried deleting the log file in /var/log/apache2 and restarting apache. 之前一切正常,但现在不记录日志,我尝试删除/ var / log / apache2中的日志文件并重新启动apache。 It does recreate the log file, but does not write to it. 它确实重新创建了日志文件,但没有写入日志文件。

The next thing I did was give full permissions and ownership to the apache user. 我要做的第二件事是为apache用户赋予完全的权限和所有权。 When that didn't work I gave permissions to everyone to read and write. 当那行不通时,我授予所有人读写权限。 That still did not work. 那仍然没有用。

In the mean time of all that, I even made a change to the php.ini file and set php to write it's errors to a separate file. 同时,我什至对php.ini文件进行了更改,并将php设置为将错误写入单独的文件中。

I've done nothing to default settings of apache. 我没有对apache的默认设置做任何事情。 I'm just not sure what happened to apache... 我只是不确定Apache发生了什么...

Its loglevel set to warn. 它的日志级别设置为警告。 Maybe there were no warn level events occuring. 也许没有警告级别的事件发生。 Change it to debug and retry please. 将其更改为调试,然后重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM