歡迎您光臨本站 註冊首頁

NGINX 400,304錯識!

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

NGINX 400,304錯識!

# tail -f access.log|grep " 400 "
220.255.7.212 - - "-" 400 0 "-" "-" -
220.156.59.254 - - "-" 400 0 "-" "-" -
220.156.59.254 - - "-" 400 0 "-" "-" -
118.165.2.169 - - "-" 400 0 "-" "-" -
211.17.113.162 - - "-" 400 0 "-" "-" -
220.255.7.218 - - "-" 400 0 "-" "-" -
220.221.119.224 - - "-" 400 0 "-" "-" -
220.221.119.224 - - "-" 400 0 "-" "-" -
219.122.40.252 - - "-" 400 0 "-" "-" -
122.131.237.232 - - "-" 400 0 "-" "-" -
210.251.40.161 - - "-" 400 0 "-" "-" -
122.116.143.35 - - "-" 400 0 "-" "-" -
58.138.54.213 - - "-" 400 0 "-" "-" -
219.0.248.9 - - "-" 400 0 "-" "-" -
218.185.168.24 - - "-" 400 0 "-" "-" -
218.185.168.24 - - "-" 400 0 "-" "-" -
218.185.168.24 - - "-" 400 0 "-" "-" -
220.255.7.211 - - "-" 400 0 "-" "-" -
210.251.40.161 - - "-" 400 0 "-" "-" -
114.16.33.139 - - "-" 400 0 "-" "-" -
114.16.33.139 - - "-" 400 0 "-" "-" -
125.174.12.159 - - "-" 400 0 "-" "-" -
121.105.198.17 - - "-" 400 0 "-" "-" -
121.105.198.17 - - "-" 400 0 "-" "-" -
218.221.159.141 - - "-" 400 0 "-" "-" -
122.116.143.35 - - "-" 400 0 "-" "-" -
221.81.44.147 - - "-" 400 0 "-" "-" -
220.255.7.237 - - "-" 400 0 "-" "-" -
114.16.33.139 - - "-" 400 0 "-" "-" -
114.16.33.139 - - "-" 400 0 "-" "-" -
220.255.7.156 - - "-" 400 0 "-" "-" -
122.116.143.35 - - "-" 400 0 "-" "-" -
122.116.143.35 - - "-" 400 0 "-" "-" -
220.255.7.183 - - "-" 400 0 "-" "-" -


# tail -f access.log|grep " 304 "
221.190.28.138 - - "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" -
124.219.177.37 - - "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6)" -
220.100.73.237 - - "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB5; .NET CLR 1.1.4322)" -
222.158.231.41 - - "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.50727)" -
114.48.143.82 - - "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; Lunascape 5.0.4.0)" -
218.173.155.213 - - "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6; KKman3.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1)" -
220.2.119.63 - - "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" -
210.139.23.16 - - "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)" -
202.91.149.198 - - "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)" -

日誌太多,沒有全部列出

下面是我的nginx的配置

user  www www;

worker_processes 8;

error_log  /raid0/logs/nginx_error.log  crit;

pid        /usr/local/webserver/nginx/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;

events
{
  use epoll;
  worker_connections 51200;
}

http
{
  include       mime.types;
  default_type  application/octet-stream;
      
  server_names_hash_bucket_size 128;
  client_header_buffer_size 128k;
  large_client_header_buffers 4 128k;
  client_max_body_size 8m;
      
  sendfile on;
  tcp_nopush     on;

  keepalive_timeout 60;

  tcp_nodelay on;

  fastcgi_connect_timeout 300;
  fastcgi_send_timeout 300;
  fastcgi_read_timeout 300;
  fastcgi_buffer_size 64k;
  fastcgi_buffers 4 64k;
  fastcgi_busy_buffers_size 128k;
  fastcgi_temp_file_write_size 128k;

  gzip on;
  gzip_min_length  1k;
  gzip_buffers     4 16k;
  gzip_http_version 1.0;
  gzip_comp_level 2;
  gzip_types       text/plain application/x-javascript text/css application/xml;
  gzip_vary on;


大家幫忙看下怎麼回事
《解決方案》

304不要緊的

400是不是因為沒有:
location / {
root   html;
index  index.html index.htm;
}
《解決方案》

原帖由 一刀砍死 於 2009-5-29 10:30 發表 http://bbs3.chinaunix.net/images/common/back.gif
304不要緊的

400是不是因為沒有:
location / {
root   html;
index  index.html index.htm;
}


server
  {
    listen       80;
    server_name  xxx.com www.xxx.com;
    index index.html index.htm index.php;
    root  /xxx/xxx;

    #limit_conn   crawler  20;   
                             
    location ~ .*\.(php|php5)?$
    {      
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_index index.php;
      include fcgi.conf;
    }

     location ~ .*\.(phtml)?$
    {  
      access_log off;   
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_index index.php;
      include fcgi.conf;
    }
   
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ico)$
    {
      access_log off;
      expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
      access_log off;
      expires      1h;
    }  
        
    log_format  new_log  '$remote_addr - $remote_user [$time_local] "$request" '
              '$status $body_bytes_sent "$http_referer" '
              '"$http_user_agent" $http_x_forwarded_for';
    access_log  /xxxx/access.log  new_log;
      }

這是我的配置,應該有加你上面所說的吧

[火星人 ] NGINX 400,304錯識!已經有514次圍觀

http://coctec.com/docs/service/show-post-22449.html