A. 如何关闭Apache的CustomLog ErrorLog日志
第一步:删除 Apache2/logs/目录下的 error.log、access.log文件
第二步:打开 Apache 的 httpd.conf配置文件并找到下面两条配置
ErrorLog logs/error.log
CustomLog logs/access.log common
直接注释掉,换成下面旦历凯的配置文件。
# 限制错误日志文件为 1M
ErrorLog “|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M”
# 每天生成一个错误日志文件
#ErrorLog “|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400″
# 限制访问日志文件为 1M
CustomLog “|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M” common
# 每天生成一个访问日志文件
#CustomLog “|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400″ common
参考:
Apache下的access.log和error.log文件处理方法
这几天有会员和我说到网站访问速度越来越慢。我查了一下,看到Apache2下面有两个日志文件非常大了,加起烂裂来有800多模唤M了。
分别是access.log和error.log。
于是在网上找找了给access.log和error.log减肥的方法,这个方法可让这两个文件按每天日期生成。这样你可以选择
把前面的旧文件删除了。
在Apache下的httpd.conf配置文件下找到下面两句:
ErrorLog logs/e
B. 如何关闭nginx,apache的默认访问日志
WDCP默认的web访问日志是开着的 这个日志,个人觉得,一般情况下也没用,不过对于一些需要要数据烂举分析的话就很有用了 如果不用的话,可以关闭,而且关闭也会也能提高点点性能的喔,这里关
WDCP默认的web访问日志是开着的
这个日志,个人觉得,一般情况下也没用,不过对于一些需要要数据分析的话就很有用了
如果不用的乱隐话,可以关闭,而且关闭也会也能提高点点性能的喔,这里关闭的是默认的服务器web默认日志
如果针对饥陪碧站点开了日志,还是会有的,但默认目录是在/www/web_logs
站点日志是在站点域名开头为文件名记录的
站点日志,也可根据实际情况是否开启,这个在wdcp后台的站点里就有
三个方式
1 直接在wdcp后台里关闭 "系统设置"里
2 执行 /www/wdlinux/tools/web_logs.sh on/off //开或关 (wdcp_v2.5版本后有)
3 如下手动操作
nginx的关闭方法
sed -i '/log_format/a\
access_log off;' /www/wdlinux/nginx/conf/nginx.conf
apache的关闭方法
sed -i 's#CustomLog "logs/access_log" common#CustomLog /dev/null common#' /www/wdlinux/apache/conf/httpd.conf你可以去后盾人里面看看哦⊙∀⊙!⊙∀⊙!⊙∀⊙!你可以去看看
C. phpstudy 如何关闭apache的日志
#ErrorLog "logs/error.log"
#CustomLog "logs/access.log" common
修改薯轮在apache目录下的httpd.conf文件,注差手世释上面的两行就行虚肢了。
D. 如何关闭 Apache 的web日志记录(unix 系统)
如下修改槐帆,禁用了错误日志和访问日志:
<VirtualHost *:80>
DocumentRoot /home/xxxxxxx
ServerName www.xxxxxxx.com.cn
ServerAlias xxxxxxx.com.cn
#ErrorLog logs/xxxxxxx.com.cn.error_log
#CustomLog logs/xxxxxxx.com.cn.access_log common
DirectoryIndex index.html index.htm default.html default.htm
ErrorDocument 404 /404.htm
</VirtualHost>铅乱雹
如下修改,只是禁用了访问日志:
<VirtualHost *:80>
DocumentRoot /home/xxxxxxx
ServerName www.xxxxxxx.com.cn
ServerAlias xxxxxxx.com.cn
ErrorLog logs/xxxxxxx.com.cn.error_log
#CustomLog logs/xxxxxxx.com.cn.access_log common
DirectoryIndex index.html index.htm default.html default.htm
ErrorDocument 404 /404.htm
</VirtualHost>
如下修改,只是禁用了错误陪闹日志:
<VirtualHost *:80>
DocumentRoot /home/xxxxxxx
ServerName www.xxxxxxx.com.cn
ServerAlias xxxxxxx.com.cn
#ErrorLog logs/xxxxxxx.com.cn.error_log
CustomLog logs/xxxxxxx.com.cn.access_log common
DirectoryIndex index.html index.htm default.html default.htm
ErrorDocument 404 /404.htm
</VirtualHost>
E. 如何清除Apacheerror.log,Access.log日志并限制日志大小
删除 Apache2/logs/目录下的 error.log、access.log文件
打开 Apache 的 httpd.conf配置文件并找到下面两条配置
ErrorLog logs/error.log
CustomLog logs/access.log common
直接注释掉,换成下面的配置文件。
# 限制Apache错误日志文件为 1M
ErrorLog “|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M”
# 每天生成错误日志文件
#ErrorLog “|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400″
# 限制芦雀访问日志文件宴岩大小为 1M
CustomLog “|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M” common
# 每天生成一个访问晌哗御日志文件
#CustomLog “|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400″ common
F. apache 错误日志 一堆错该怎么解决
在httpd.conf文件中添加 Win32DisableAcceptEx 标记,如下:
\< IfMole mpm_winnt.c\>
ThreadsPerChild 1000
MaxRequestsPerChild 10000
Win32DisableAcceptEx
\</IfMole\>正键
这 样可以允许并发连接更大岁清困一些。同时性能上也不会有明显的降低. 一般,这样设置基本就能搞定,但是我碰到的情况,就是想上面那样关闭AcceptEx,乎念也会出现类似问题,Apache还是不能正常运作, error.log 出项了大量的:Sat Dec 24 17:21:28 2006] [warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed
G. Apache服务器错误问题
解决1:
1. 打开 httpd.conf
2.找到 mod_rewrite.so 行,将前面的注释打开(即删掉前面的'#'符号)。
3.关闭httpd.conf,重启apache服务器即可。
解决2:
httpd.conf 中找到你网站目录对应的Directory 行,将其中的 RewriteEngine 项设置为 'ALL'。