Board logo

标题: [教程] 什么是默认的web访问日志 [打印本页]

作者: admin    时间: 2012-7-26 20:34     标题: 什么是默认的web访问日志

apache或nginx都有开关默认日志,一个是正常访问日志,一个是错误的日志
目录在/www/wdlinux/apache/logs/
/www/wdlinux/nginx/logs/

这两个日志,会记录所有的正常与不正常的访问日志信息
而且是所有服务器上的域名,除非,在站点管理城,启用了日志记录,才会将相应的站点域名日志记录到另一个独立的文件中
否则,都会记录在这几个文件里
所以,是默认日志文件

不过,一般来说,这个日志是不是必须的,除非有其它必要,比如分析日志或做其它的数据统计用
否则,关闭日志,只有好处,没坏处

如何关闭,请看
http://www.wdlinux.cn/bbs/thread-2104-1-1.html
作者: zsroot    时间: 2012-7-27 15:22

学习了。··········
作者: testu    时间: 2012-8-9 14:47

本帖最后由 testu 于 2012-8-9 14:54 编辑

无法统计,在找原因。。。。
作者: testu    时间: 2012-8-9 15:49

似乎是日志格式不符合awstats的规范,咋办呢

AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /www/web_logs/ipodhk.com_access_log must have a bad format or LogFormat parameter setup does not match this format.

Your AWStats LogFormat parameter is: 1
This means each line in your web server log file need to have "combined log format" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"

And this is an example of records AWStats found in your log file (the record number 50 in your log):
192.168.4.1 - - [09/Aug/2012:15:15:07 +0800] "GET /awstats/awstats.pl?config=www.ipodhk.com HTTP/1.0" 401 290


Setup ('/etc/awstats/awstats.www.ipodhk.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
作者: testu    时间: 2012-8-9 17:02

靠 不看日志不知道,一看吓一跳,哪位兄弟想黑我呢。。。。。汗
  1. 192.168.4.1 - - [09/Aug/2012:17:01:28 +0800] "HEAD /www.ipodhk.comwww.ipodhk.com.rar HTTP/1.0" 404 -
  2. 192.168.4.1 - - [09/Aug/2012:17:01:30 +0800] "HEAD /www.ipodhk.com.rar HTTP/1.0" 404 -
  3. 192.168.4.1 - - [09/Aug/2012:17:01:30 +0800] "HEAD /www.ipodhk.com1.rar HTTP/1.0" 404 -
  4. 192.168.4.1 - - [09/Aug/2012:17:01:31 +0800] "HEAD /ipodhkipodhk.rar HTTP/1.0" 404 -
  5. 192.168.4.1 - - [09/Aug/2012:17:01:31 +0800] "HEAD /ipodhk.rar HTTP/1.0" 404 -
  6. 192.168.4.1 - - [09/Aug/2012:17:01:32 +0800] "HEAD /ipodhk1.rar HTTP/1.0" 404 -
  7. 192.168.4.1 - - [09/Aug/2012:17:01:29 +0800] "POST /wp-cron.php?doing_wp_cron=1344502888.8065030574798583984375 HTTP/1.0" 200 92
  8. 192.168.4.1 - - [09/Aug/2012:17:01:32 +0800] "HEAD /wwwipodhkcomwwwipodhkcom.rar HTTP/1.0" 404 -
  9. 192.168.4.1 - - [09/Aug/2012:17:01:34 +0800] "HEAD /wwwipodhkcom.rar HTTP/1.0" 404 -
  10. 192.168.4.1 - - [09/Aug/2012:17:01:35 +0800] "HEAD /wwwipodhkcom1.rar HTTP/1.0" 404 -
  11. 192.168.4.1 - - [09/Aug/2012:17:01:35 +0800] "HEAD /ipodhk.comipodhk.com.rar HTTP/1.0" 404 -
  12. 192.168.4.1 - - [09/Aug/2012:17:01:33 +0800] "POST /wp-cron.php?doing_wp_cron=1344502893.0803399085998535156250 HTTP/1.0" 200 92
  13. 192.168.4.1 - - [09/Aug/2012:17:01:39 +0800] "HEAD /ipodhk.com.rar HTTP/1.0" 404 -
  14. 192.168.4.1 - - [09/Aug/2012:17:01:40 +0800] "HEAD /ipodhk.com1.rar HTTP/1.0" 404 -
  15. 192.168.4.1 - - [09/Aug/2012:17:01:41 +0800] "HEAD /ipodhkcomipodhkcom.rar HTTP/1.0" 404 -
  16. 192.168.4.1 - - [09/Aug/2012:17:01:41 +0800] "HEAD /ipodhkcom.rar HTTP/1.0" 404 -
  17. 192.168.4.1 - - [09/Aug/2012:17:01:42 +0800] "HEAD /ipodhkcom1.rar HTTP/1.0" 404 -
复制代码

作者: soyuyi    时间: 2012-10-4 10:02

回复 1# admin


   eaccelerator_cache可以删除吗?/www/wdlinux/eaccelerator_cache/
作者: admin    时间: 2012-10-4 12:19

不可以的,这个删了可能会有问题的

不过里面的子目录是可以删
作者: soyuyi    时间: 2012-10-4 12:29

回复 7# admin


   eaccelerator_cache 这个文件夹里的所有东西都可以删除?就是这个目录不删除就没问题是吧?
作者: admin    时间: 2012-10-4 14:17

可以,不过删除后,只要有启动EA,还是会自动创建这些目录的
作者: aa4810012    时间: 2014-4-12 10:50

回复 1# admin

目录在/www/wdlinux/apache/logs/
/www/wdlinux/nginx/logs/  这两个默认日志125.70.243.211 - - [19/Jun/2012:14:55:04 +0800]   都是这个时间点,我想可能是买来的时候就关了,但是我想看看蜘蛛的情况,去看了论坛的帖子, 可是我找到www/www_logs  这个文件夹下面是空的,请问下面需要建立什么文件么, 另外论坛中看到的  http://www.wdlinux.cn/bbs/viewth ... hlight=%C8%D5%D6%BE  这个上面的日志切割我也没能找到 ,操作系统:Linux 2.6.32-220.4.1.el6.i686  这是我的操作系统,不过我是纯新手,所以在此寻求指点




欢迎光临 WDlinux官方论坛 (http://www.wdlinux.cn/bbs/) Powered by Discuz! 7.2