问题现象:Nginx服务已启动80端口被nginx监听宿主和linux虚机可相互ping通Linux虚机可用curl访问网站宿主无法用浏览器访问网站排查:1.查看nginx的access.log发现没有请求进来由此可判断是防火墙给挡住了检查iptables状态,发现iptables没有启动(其实是没有安装)百度后发现centos默认用firewall做为防火墙不是iptables,于是用syste
分类:
Web程序 时间:
2018-03-13 21:06:29
阅读次数:
237
0x00 Powershell win2003、winXP不支持 通过IE下载文件 0x01 ftp ftp 192.168.3.2 输入用户名和密码后 lcd E:\file 进入E盘下的file目录 cd www 进入服务器上的www目录 get access.log 将服务器上的access. ...
分类:
Windows程序 时间:
2018-03-12 18:36:54
阅读次数:
3740
import timepointer = 0 #存文件指针变量while True: with open('access.log') as fr: ips = [] fr.seek(pointer) #移动指针 for line in fr: ip = line.split()[0] ips.app ...
分类:
其他好文 时间:
2018-03-02 16:41:06
阅读次数:
161
NGINX-html静态页面Access Denied,包括.js 和.png都无法显示 more /var/log/nginx/error.log "fastcgi://127.0.0.1:9000", host: "47.93.55.148", referrer: "http://47.93.5 ...
分类:
数据库 时间:
2018-02-10 20:47:55
阅读次数:
596
#!/usr/bin/python#coding:utf-8importrez=0file=open(‘/var/log/httpd/access_log‘)foriinfile:x=re.search(‘Firefox‘,i)ifx:z+=1file.close()print"次数为:",z
分类:
编程语言 时间:
2018-02-09 17:28:58
阅读次数:
193
查看某个时间段的日志(比如access.log日志),如何实现?方法有很多种,比如我要看查的时间是2018年2月5号--2月6号的日志吧。(1).用sed命令,格式为:sed-n‘/起始时间/,/结束时间/p‘日志文件,如下:sed-n‘/05\/Feb\/2018/,/06\/Feb\/2018/p‘access.log(2).用grep,格式为:grep-E
分类:
系统相关 时间:
2018-02-06 14:56:02
阅读次数:
331
=================正则匹配 [root@web02 conf.d]# cat apache-grok.conf input{ file { path => "/var/log/httpd/access_log" type => "apache_access.log" start_po... ...
分类:
其他好文 时间:
2018-01-26 22:42:19
阅读次数:
138
分析IP[$1]++##统计IP下标出现的次数for(iinIP){printIP[i],i}循环输出IP下标出现的次数和下标(ip地址)172.25.0.11172.25.0.12172.25.0.11172.25.0.10分析后的结果:awk‘{IP[$1]++}END{for(iinIP){printIP[i],i}}‘/var/log/httpd/access_log|aw
分类:
其他好文 时间:
2018-01-26 14:50:35
阅读次数:
152
一、环境准备 1、在nginx的配置文件中,添加status配置 location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; allow 172.17.19.19; //zabbix服务器的IP地址,一般是内网地 ...
分类:
其他好文 时间:
2018-01-18 20:39:59
阅读次数:
216