本文介绍: net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)这种错误是由于请求文件太大,下载不了导致的。修改以下配置参数即可

net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)这种错误是由于请求文件太大,下载不了导致的。修改以下配置参数即可。

http {

    include       mime.types;
    default_type  application/octet-stream;
	server_tokens off;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;
    client_max_body_size 600M;
    client_body_buffer_size 1280k;
	

    #keepalive_timeout  0;
    keepalive_timeout  65;
	
    proxy_connect_timeout 600;	
    proxy_read_timeout 600;	
    proxy_send_timeout 600;
	
	fastcgi_connect_timeout 600;
	fastcgi_send_timeout 600;
	fastcgi_read_timeout 600;
	

    gzip  on;

    upstream xxglxt{ 
      ip_hash;      
      server 127.1.1.1:8181;   
    }
	
    upstream martxxtx{ 
      ip_hash; 
      server 127.1.1.1:8180;    
    }
    
    server {
        listen       80;
        server_name  127.1.1.1;
		
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location  /MartXtxx{
            root   html;
            index  index.html index.htm;
	        proxy_set_header   Host    $host:$server_port;
            proxy_set_header   X-Real-IP   $remote_addr; 
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;	
	        proxy_pass http://martxxtx;      
        } 

        location  / {
            root   html;
            index  index.html index.htm; 
            proxy_set_header   Host    $host:$server_port;
            proxy_set_header   X-Real-IP   $remote_addr; 
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;			
	        proxy_pass http://xxglxt/;
	        
			proxy_buffer_size 4k;
			proxy_buffers 8 32k;
			proxy_buffering            on;
			proxy_busy_buffers_size    64k;
			proxy_temp_file_write_size 64k;
			proxy_max_temp_file_size   0;
      }

}

原文地址:https://blog.csdn.net/u012949335/article/details/130666146

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_22688.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注