nginx的log日志分为access log 和 error log 其中access log 记录了哪些用户,哪些页面以及用户浏览器、ip和其他的访问信息 error log 则是记录服务器错误日志 错误日志的形式如下: 10.1.1.1 - - [22/Aug/2014:16:48:14 +0 ...
分类:
其他好文 时间:
2017-05-03 13:11:44
阅读次数:
123
基于IP端口虚拟主机如果配置基于端口的虚拟主机,就需要每个虚拟主机配置有不同的端口[root@localhostextra]#vimnginx_vhosts.confserver{listen8060;server_namewww.you.comyou.com;location/{root/data0/www/www;indexindex.htmlindex.htm;access_log/app/logs/www_access.lo..
分类:
其他好文 时间:
2017-04-30 01:10:37
阅读次数:
196
模拟日志脚本 模拟日志切割过程中初始化脚本参数 cp access.log access20170408.log && echo > access.log && echo '0'> offset.txt 成功 End! ...
分类:
编程语言 时间:
2017-04-28 22:18:48
阅读次数:
409
通过访问日志access.log统计IP和每个地址访问的次数101.226.61.184--[22/Nov/2015:11:02:00+0800]"GET/mobile/sea-modules/gallery/zepto/1.1.3/zepto.jsHTTP/1.1"20024662"http://m.oldboyedu.com/mobile/theme/oldboyedu/home/index.html""Mozilla/5.0(Linux;U;Android5.1.1;..
分类:
数据库 时间:
2017-04-27 10:18:06
阅读次数:
266
第一版,比较粗糙,仅限于能用 正在写入的文件不能用tar进行压缩 压缩日志 94 access.log 95 tar: access.log: file changed as we read it 96 #### 压缩日志失败 #### ...
分类:
系统相关 时间:
2017-04-20 23:54:26
阅读次数:
493
Nginx二级域名配置模板 域名一:www.hellosr.com 域名二:daxin.hellosr.com 通过upstream进行负载均衡,通过access_log的配置规范化请求日志输出 配置如下: #运行用户 #user www-data; #启动进程,通常设置成和cpu的数量相等 wor ...
分类:
其他好文 时间:
2017-04-16 13:11:49
阅读次数:
173
进入 lamp安装目录 ./ctlscript.sh restart 重启 实时查看日志 tail -f error_log 查看日志方法 404 及某天的方法cat access_log_2017_04_16| grep "16/Apr"|grep " 404" |more ...
分类:
Web程序 时间:
2017-04-16 12:11:35
阅读次数:
273
nginx日志配置指令详解日志对于统计排错来说非常有利的。本文总结了nginx日志相关的配置如access_log、log_format、open_log_file_cache、log_not_found、log_subrequest、rewrite_log、error_log。nginx有一个非常灵活的日志记录模式。每个级别的配置可以有各自独立的访问日志..
分类:
其他好文 时间:
2017-04-15 12:44:23
阅读次数:
188
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%s %D %t %a %U" fi ...
分类:
其他好文 时间:
2017-04-13 08:53:42
阅读次数:
222
文件查找 查找文件大小大于5G的文件:find / -type f -size +5G 删除大量文件的方式:find . -name "*.trm" | xargs rm -rf '*' 查看当前文件夹下文件总数 find -type f | wc -l 磁盘操作 查看access_log占用磁盘空 ...
分类:
系统相关 时间:
2017-04-12 13:33:33
阅读次数:
277