我遇到了一些Apache Web服务器错误日志的问题。
我的计算机上有一个虚拟托管的网站scotthermmann.loc。在我手动清除错误日志后,使用
sudo cat /dev/null > scotthermmann.loc-error_log
或者通过在emacs中打开文件并删除所有内容,错误将不再记录到文件中。我试过使用
sudo apachectl restart
解决问题,但不能解决。注销并重新登录也无法解决。解决问题的方法是重新启动计算机,但是每次清除错误日志后,我都不想这样做。
我托管的每个网站都并非如此。我有另一个网站nudefootfool.loc。清除错误日志后,我没有任何问题。
两个虚拟站点在httpd-vhosts.conf文件中的设置基本相同。对于scottherrmann.loc:
DocumentRoot "/Users/dan/Sites/scottherrmann.com" ServerName scottherrmann.loc ServerAlias www.scottherrmann.loc ErrorLog "/private/var/log/apache2/scottherrmann.loc-error_log" CustomLog "/private/var/log/apache2/scottherrmann.loc-access_log" Options Indexes FollowSymLinks AllowOverride All Order Allow,Deny Allow from all
而对于footfootfool.loc:
DocumentRoot "/Users/dan/Sites/barefootfool.com" ServerName barefootfool.loc ServerAlias www.barefootfool.loc ErrorLog "/private/var/log/apache2/barefootfool.loc-error_log" CustomLog "/private/var/log/apache2/barefootfool.loc-access_log" Options Indexes FollowSymLinks AllowOverride All Order Allow,Deny Allow from all
有谁知道是什么原因引起的问题?