apache包含<virtualhost><directory>等主配置模块。<VirtualHost*:80>ServerNamexxx;DocumentRoot/var/www/html;access-log/xxxx/xxx/xxx-log;error-log/xxx/xxx/xxx-log;#以上配置参数后面的内容可以任意,只要存在https的访问方式:安装mod_ssl防火墙开通4..
分类:
Web程序 时间:
2017-09-04 15:15:06
阅读次数:
210
简介 Netstat 命令用于显示各种网络相关信息,如网络连接,路由表,接口状态 (Interface Statistics),masquerade 连接,多播成员 (Multicast Memberships) 等等。 输出信息含义 执行netstat后,其输出结果为 ? ? Active Int ...
分类:
数据库 时间:
2017-08-31 10:59:56
阅读次数:
364
防盗链1、编辑配置文件[root@plinuxos~]#vi/usr/local/nginx/conf/vhost/default.confserver{listen80default_server;server_nameaaa.com;indexindex.htmlindex.htmindex.php;root/data/wwwroot/default;access_log/tmp/default.logjuispan;location~*^.+\.(gif|jpg|png|swf|fl..
分类:
其他好文 时间:
2017-08-29 18:57:50
阅读次数:
183
公司要进行系统优化,现对nginx服务请求时间及请求量进行分析。 在linux下的nginx请求文件进行切割 获取access log 日志分析 1:获取uri和请求时间记录到tmp_0.log cat app_access.log | awk -F '|' '{print $5 " " $11}' ...
分类:
系统相关 时间:
2017-08-20 18:38:45
阅读次数:
161
#!/bin/sh myPath="/var/log/httpd/" myFile="/var /log/httpd/access.log" #这里的-x 参数判断$myPath是否存在并且是否具有可执行权限 if [ ! -x "$myPath"]; then mkdir "$myPath" fi ...
分类:
系统相关 时间:
2017-08-04 16:08:28
阅读次数:
249
#!/usr/bin/python #coding=utf8 log_file = "/usr/local/nginx/logs/access.log" with open(log_file) as f: contexts = f.readlines() # define ip dict### ip... ...
分类:
编程语言 时间:
2017-08-03 17:01:43
阅读次数:
282
采集和防止采集是一个经久不息的话题,一方面都想搞别人的东西,另一方面不想自己的东西被别人搞走。 本文介绍如何利用nginx屏蔽ip来实现防止采集,当然也可以通过iptable来实现。 1.查找要屏蔽的ip awk '{print $1}' nginx.access.log |sort |uniq - ...
分类:
其他好文 时间:
2017-08-01 16:39:51
阅读次数:
204
1、CustomLog "|bin/rotatelogs.exe logs/access_%Y_%m_%d.log 86400 480" combined 这里修改成上图所示,然后重启apache.重启以后如下图: 他会打开一个命令行窗口一直守护着,关不掉的。而且你也可以把带日期的日志文件删掉,然后 ...
分类:
Web程序 时间:
2017-08-01 11:09:17
阅读次数:
420
server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; root "D:/phpStudy/WWW/m.idaipai.com/public"; locati ...
分类:
Web程序 时间:
2017-07-27 13:32:01
阅读次数:
686
参考资料 apache开启日志记录,access.log Apache配置文件里的LogLevel指令说明 apache官方文档 apache logs 关于error log 今天在一台测试服务器上测试项目时,有一个请求返回了500状态码,web服务器使用的是apache,于是就查找apache错 ...
分类:
数据库 时间:
2017-07-26 01:46:38
阅读次数:
297