查看nginx访问次数前列的IP:cat/usr/local/nginx/logs/domain.access.log|awk‘{print$1}’|sort|uniq–c|head-n10
分类:
其他好文 时间:
2016-05-16 14:40:14
阅读次数:
131
打开tomcat安装路径下cron/server.xml文件,在135行左右,增加rotatable="false"来消除文件名中的日期。
分类:
数据库 时间:
2016-05-05 17:53:06
阅读次数:
345
nginx.conf里会有两个日志,分为access.log和error.log。其中这两个日志可以细化,一般来说在nginx目录下会有一个logs会保存,然后也可以在对应的server目录里可以分别的设定access.log和error.log来了解对应server的情况。access.log主要是记录"谁来登陆了,从哪里登陆的,登陆..
分类:
其他好文 时间:
2016-05-03 16:21:35
阅读次数:
3169
Apache日志按时间分段记录 在apache的配置文件httpd.conf中找到ErrorLog logs/error_log及CustomLog logs/access_log common Linux系统配置方法: 将其改为ErrorLog “| /usr/local/apache/bin/r ...
分类:
Web程序 时间:
2016-04-20 10:01:58
阅读次数:
207
1、修改Nginx日志格式:log_formatjson‘$remote_addr-$remote_user[$time_local]"$request"‘
‘$status$body_bytes_sent"$http_referer"‘
‘"$http_user_agent""$http_x_forwarded_for"‘;
access_log/data/nginx_logs/access.logjson;2、Nginx日志切割(shell脚本,略)3、安装G..
分类:
其他好文 时间:
2016-04-16 19:42:06
阅读次数:
340
初学web开发,今天安装了一个tomcat,运行正常,但访问的时候显示空白页,并在日志localhost_access_log.xxxx-xx-xx.txt中出现类似错误:192.168.1.100--[15/Apr/2016:19:48:58+0800]"GET/examples/index.htmlHTTP/1.1"2001253baidu了几个小时也没解决问题,最后打开安装包中的运行说..
分类:
其他好文 时间:
2016-04-15 23:13:13
阅读次数:
252
一、Nginx日志配置分类access_log 访问日志配置log_format 定义日志格式open_log_file_cache 设置日志缓存log_not_found 记录不存在日志配置log_subrequest 记录子请求的日志配置rewrite_log Rewrite日志error_log 错误日志二、日志配置1、access_log配置语法:access_logpath[..
分类:
其他好文 时间:
2016-04-13 20:55:21
阅读次数:
198
1:修改windows中的hosts文件192.168.2.20phpadmin.test.com2:配置/etc/httpd/httpd-vhosts.conf<VirtualHost*:80>DocumentRoot"/vhost/phpadmin"ServerNamephpadmin.test.com#ServerAlias.com#ErrorLog"logs/test_error_log"#CustomLog"logs/test_access_log"combined&l..
分类:
Web程序 时间:
2016-04-09 01:51:49
阅读次数:
564
nginx 配置虚拟文件夹而且url 重定向 server { #侦听80port listen 8090; #定义使用www.xx.com訪问 server_name 127.0.0.1; #设定本虚拟主机的訪问日志 access_log /var/log/nginx/access.log; er ...
分类:
Web程序 时间:
2016-04-03 21:52:07
阅读次数:
198
cutlog.sh#!/bin/bash##Nginx日志切割脚本##零点执行该脚本##Nginx日志文件所在的目录LOGS_PATH=/opt/nginx/logs##获取昨天的yyyy-MM-ddYESTERDAY=$(date-d"yesterday"+%Y%m%d)##移动文件mv${LOGS_PATH}/access.log${LOGS_PATH}/shop_access_${YESTERDAY}.log##向Nginx主进程发..
分类:
其他好文 时间:
2016-03-30 16:35:45
阅读次数:
90