歡迎您光臨本站 註冊首頁

nginx 400 bad request

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

nginx 400 bad request

最近在訪問量不大的幾台nginx伺服器經常報 400 bad request。已經對    client_header_buffer_size 128k;       large_client_header_buffers 4 512k; 參數做了調整,還是出400錯誤
cookie 不會超過1k 。
nginx 配置文檔
http

•{

•  include       mime.types;

•  default_type  application/octet-stream;

•  #charset  gb2312;

•      

•  server_names_hash_bucket_size 128;

•  client_header_buffer_size 256k;

•  large_client_header_buffers 8 256k;

•  client_max_body_size 32m;

•      

•  sendfile on;

•  tcp_nopush     on;

•  keepalive_timeout 600;

•  

•  tcp_nodelay on;

•  server_tokens off;

•  fastcgi_pass_header Set-Cookie;

•  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;

•  ssi on;

•  ssi_silent_errors on;

•  ssi_types text/shtml;

•  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/html application/shtml text/javascript;

•  gzip_vary on;複製代碼server

•     {

•     listen  80;

•     server_name     localhost;

•   

•     index index.html  index.htm index.php index.jsp;   

•     root /data0/htdocs/e37www/ROOT;

•   

•      #rewrite (.*)/ks/fsqueryProcess.jsp  http://$host/ks/fsquery.html last;

•       location /

•    {

•           expires 1h;

•         

•          #server_name_in_redirect off;

•           if ( -d $request_filename )  {

•               rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;

•         }        

•           

•  }



•         location ~ .*\.(jsp)$

•            {

•            proxy_next_upstream http_502 http_500 http_504 error timeout invalid_header;

•            proxy_set_header Host $host;

•            #add_header      DZWWW-Cache     "$upstream_cache_status  from  www.dzwww.com";

•            proxy_set_header X-Forwarded-For $remote_addr;

•            proxy_pass http://127.0.0.1:8080;



•            }



•          location ~ .*\.(htm|html)

•            {

•            

•            expires 1h;

•         

•            }

•            

•             location ~ .*\.(gif|jpg|png|bmp|ico|jpeg|JPEG|JPG|GIF)$ {

•            

•             expires 1h;

•            

•         

•            }

•            location ~ .*\.(doc|swf|flv)$ {

•            

•             expires 1h;

•            

•            }

•              

•            location ~ .*\.(js|css)$ {

•             #expires 1h;

•            

•         

•            }



•access_log   /data0/logs/log.log main;

•}複製代碼
錯誤日誌
- - ccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* "400" 166 "-" "-" "-"

•172.19.7.2 - -   image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/QVOD, application/QVOD, */* "400" 166 "-" "-" "-"

[火星人 ] nginx 400 bad request已經有747次圍觀

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