ChinaUnix.net
相关文章推荐:

nginx 错误日志分析

在这里混的时间不短了,发现这里都是大神级人物,赞一个先! 小弟又遇到问题了! 先说说问题,这两天我在做nginx日志分析,第一步我要把日志的格式做的有规律,这一步已经在大家的帮助下搞定了! 现在的需求是找一个人的行走轨迹,即一个人从第一个时间来到某个时间走的轨迹,我们网站做了一个uid来跟踪这个用户,也就是说不需要考虑ip原因了,但是这又有问题了,虽然我们能确定同一个uid的人是同一个用户,但是这些用户都是无序的存在日志里...

by linuxKong - Shell - 2011-12-06 19:33:19 阅读(5263) 回复(7)

相关讨论

我看nginx源代码的时候,感觉整个系统都在传递log指针。log在nginx里是比较关键的。日志和内存分配是最基础的两个起点代码,最好是在自己写的程序框架中早点完善并实现。以免未来要用大量的精力调整。

1. 日志的源代码位置

日志的源代码在src/code/ngx_log.c及ngx_log.h里。

2. 日志的初始化

在main()函数一开始,对...

by ChianXu - Web开发 - 2011-12-22 08:54:27 阅读(1274) 回复(0)

原文出处 http://blog.luwenju.com/158.html 在很多时候,我们会非常关注网站的访问量,比如网站的日PV是多少、网站某个功能上线之后点击量是多少,像这些东西都是需要从web容器中的访问日志统计出来的,下面我们看一下如何在nginx中统计网站的访问信息 1、设置nginx访问日志记录格式 在默认情况下,nginx只是记录相关get信息,像post页面是不记录的,所以下面需要修改nginx.conf,让其访问日志记录post等请求信息,在ngi...

by luwenju - 监控及自动化运维技术 - 2014-10-23 11:56:11 阅读(15536) 回复(5)

很多PHP搭建的网站都在由apache转向了nginxnginx的日志信息如何分析呢? 当然你可以自己写一个,但是这里也推荐一款结果信息非常详尽的开源工具——Awstats ,它基于perl编写,它的介绍如下: AWStats is a free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all possible informa...

by linesky - PHP - 2010-12-22 18:43:00 阅读(3196) 回复(0)

本帖最后由 lxlxlx16 于 2013-12-27 16:58 编辑 #user nobody; worker_processes 8; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { use epoll; worker_connections 1024; } http { include mime.types; default_type application/octet-stream; ##cache## proxy_connect_timeout 50; pr...

by lxlxlx16 - Linux系统管理 - 2013-12-27 16:59:33 阅读(2020) 回复(3)

./configure --prefix=/usr/local/nginx/ --with-http_ssl_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --add-module=/usr/local/src/nginx_upstream_jvm_route/ --with-http_realip_module --with-pcre=/usr/local/src/pcre-8.32/ checking for mmap("/dev/zero", MAP_SHARED) ... found checking for System V shared memory ... found checking for POSIX semaphores ... ...

by yuntianya - 集群和高可用 - 2013-04-28 01:17:42 阅读(2034) 回复(2)

你好 版主 我在nginx+php环境里运行的。。0477 directory index of "/var/storage/data/" is forbidden, client: 192.168.2.110, server: *.XX.XXX.com, request: "GET / HTTP/1.1", host: "img2.XX.XXX.com", referrer: "http://www.XXXX.com/information/show/483" 2011/10/19 14:44:48 [error] 3005#0: *10495 directory index of "/var/storage/data/" is forbidden, client: 192.168.2.110, server: *.XXX.XXXXX...

by a746315003 - 分布式文件系统(FastDFS) - 2011-10-19 14:58:26 阅读(2745) 回复(0)

问题描述: [root@localhost sbin]# ./nginx [emerg]: the using of the regex "\.php$" requires PCRE library in /usr/local/nginx//conf/nginx.conf:65 配置文件:[code]server { listen 80; server_name 1.hg.com ; index index.html index.htm index.php; root /data0/htdocs/blog; #limit_conn crawler 20; location ~ \.php$ { #fastcgi_pass unix:/tmp/php-cgi.sock; ...

运维

by 凝望长空 - 监控及自动化运维技术 - 2011-05-03 12:29:03 阅读(1721) 回复(0)

大家好,我的机器上跑着 nginx 0.8.x + PHP 5.2.10(FastCGI) +discuz 6.0 + mysql 最近老是报 502 的错误, 按照网上的方法修改了: fastcgi_connect_timeout 400; fastcgi_send_timeout 300; fastcgi_read_timeout 300; 还是不行,最近情况好像更加严重了,我这个论坛每天的PV才24W左右吧, 用命令:netstat -anop | grep "php" | grep -v "grep" | wc -l 查看的时候 可以看到高的时候可以达到 265 ,这个值一高的话,就会出...

by crush1567 - 服务器应用 - 2009-11-03 20:14:02 阅读(1186) 回复(0)

nginx部署了一个软件下载站,可是在log日志里经常出现400的错误 错误日志如下,查了网上资料说是修改,下面两个选项可以解决,但是我添加以后,400错误仍然出现。有哪位知道如何解决吗 client_header_buffer_size 128k; large_client_header_buffers 8 128k; 117.136.13.3 - - [14/Aug/2009:16:13:08 +0800] - 400 0 - - - - 117.136.22.137 - - [14/Aug/2009:16:13:04 +0800] - 400 0 - - - -

by 西山晴雪 - Linux系统管理 - 2014-12-06 18:50:10 阅读(9672) 回复(12)