Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: logi
- To: <nginx-ru@xxxxxxxxx>
- Subject: RE: logi
- From: "Rasuk Evgeniy" <Rasuk@xxxxxxxx>
- Date: Fri, 15 Jul 2005 10:12:33 +0400
- Content-class: urn:content-classes:message
- Thread-index: AcWIjB44GlPgCy7BRaiQduvmdnzrygAdw7wQ
- Thread-topic: logi
Сори что не понимаю с первого раза , но картина след.
-> как буд то логи и не правил....
Nginx.conf
user nobody;
worker_processes 3;
error_log logs/error.log;
pid logs/nginx.pid;
events {
connections 1024;
}
http {
include conf/mime.types;
default_type application/octet-stream;
tcp_nodelay on;
keepalive_timeout 0;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain;
gzip_http_version 1.0;
output_buffers 1 32k;
postpone_output 1460;
tcp_nopush on;
send_lowat 12000;
sendfile on;
client_header_timeout 10m;
client_body_timeout 10m;
server {
listen myIP:80;
access_log logs/access-main.log;
log_format main '%{host}v %addr %{proxy_add_x_forwarded_for}v '
'%time %request %status %{Referer}i '
'%{User-Agent}i %gzip_ratio';
server_name qwerty.msk.ru;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
send_timeout 10m;
proxy_header_buffer_size 1024;
proxy_buffers 8 1024;
proxy_busy_buffers_size 1024;
proxy_pass http://127.0.0.2/;
}
}
}
# vi access-main.log
192.168.11.151 - - [15/Jul/2005:10:08:23 +0400] "GET /1.asp HTTP/1.1" 200 7288
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.8) Gecko/2005
0511 Firefox/1.0.4"
192.168.11.151 - - [15/Jul/2005:10:08:24 +0400] "GET
/1.asp?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 4684
"http://qwerty.msk.ru/1.asp" "
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.8) Gecko/20050511
Firefox/1.0.4"
192.168.11.151 - - [15/Jul/2005:10:08:24 +0400] "GET
/1.asp?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2172
"http://qwerty.msk.ru/1.asp" "
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.8) Gecko/20050511
Firefox/1.0.4"
192.168.11.151 - - [15/Jul/2005:10:08:25 +0400] "GET /favicon.ico HTTP/1.1" 404
193 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.8) Gecko
/20050511 Firefox/1.0.4"
~
__________
Что-то я %{host}v в этих строках вообще не вижу.
"http://csmforge.msk.ru/1.asp" - это реферер.
Как выглядит access_log ? Такое ощущение, что выводится в стандартном формате.
Нужно
access_log /path/to/log format;
Кстати, формат можно задавать так:
log_format main '%{host}v %addr %{proxy_add_x_forwarded_for}v '
'%time %request %status %{Referer}i '
'%{User-Agent}i %gzip_ratio';
Игорь Сысоев
http://sysoev.ru
|