the server responded with a status of 414 (Request-URI Too Large)
nginx 配置不当,前端ajax调用报错:
the server responded with a status of 414 (Request-URI Too Large)
浏览器F12报错如下:

原因是:url 中的 参数太长,超过了nginx默认值,解决方法:
在nginx.conf中加入下面的参数(client_header_buffer_size 和 large_client_header_buffers ):
server {
listen 80;
server_name localhost;
client_header_buffer_size 2m;
large_client_header_buffers 4 200m;
----------------------------------
https://stackoverflow.com/questions/1067334/how-to-set-the-allowed-url-length-for-a-nginx-request-error-code-414-uri-too
Syntax: large_client_header_buffers number size ;
Default: large_client_header_buffers 4 8k;
Context: http, server
Sets the maximum number and size of buffers used for reading large client request header. A request line cannot exceed the size of one buffer, or the 414 (Request-URI Too Large) error is returned to the client. A request header field cannot exceed the size of one buffer as well, or the 400 (Bad Request) error is returned to the client. Buffers are allocated only on demand. By default, the buffer size is equal to 8K bytes. If after the end of request processing a connection is transitioned into the keep-alive state, these buffers are released.
the server responded with a status of 414 (Request-URI Too Large)的更多相关文章
- Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)
Node应用,使用formidable处理文件上传,本地测试没有问题,部署到服务器上之后上传大文件浏览器收到以下错误信息: Failed to load resource: the server re ...
- 上传图片报错-Failed to load resource:the server responded with a status of 413(Request Entity Too Large)
使用.netcore2.1 做文件上传时,要求是小于20M,上传3至5M都没问题,大于10M,提示错误[如标题],原来是nginx配置的原因 [HttpPost("Postcard" ...
- Nginx 限制上传文件的大小。responded with a status of 413 (Request Entity Too Large)
# 限制请求体的大小,若超过所设定的大小,返回413错误. client_max_body_size 50m; # 读取请求头的超时时间,若超过所设定的大小,返回408错误. client_heade ...
- 报错解决——Failed to load resource: the server responded with a status of 404 (Not Found) favicon.ico文件找不到
Django项目开发完成后在本地运行没问题,但在推到服务器上后出现报错Failed to load resource: the server responded with a status of 40 ...
- jsp中引入jquery报错:Failed to load resource: the server responded with a status of 404 (Not Found)
问题描述: 今天自己在搭建spring.springMVC.hibernate框架,搭建完成后,在引入jquery时,发现jquery不管用.我的解决顺序是: 1.检查路径,发现路径没错,另外需要注意 ...
- 待解决:2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()
2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()
- Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found) 报错情况:图标加载失败 原因分析:路径错误 ...
- mpvue 小程序加载不了图片 Error: Failed to load local image resource /images/xx.png the server responded with a status of 404 (HTTP/1.1 404 Not Found)
mpvue开发小程序时候,要添加静态本地图片 <img src="../../images/bg.png" alt=""> 会报错: VM14878 ...
- Spring Boot Failed to load resource: the server responded with a status of 404 ()
出现错误: Failed to load resource: the server responded with a status of 404 () 但是其他页面正常显示: 原因: 浏览器看一下: ...
随机推荐
- bzoj 2727: [HNOI2012]双十字
Description 在C 部落,双十字是非常重要的一个部落标志.所谓双十字,如下面两个例子,由两条水平的和一条竖直的"1"线段组成,要求满足以下几个限制: 我们可以找到 5 个 ...
- 自定义tab吸顶效果一(原理)
PS:问题:什么是吸顶,吸顶有什么作用,吸顶怎么使用? 在很多app商城中,介绍软件的时候就会使用吸顶效果, 吸顶有很多作用,一个最简单粗暴的作用就是,让用户知道此刻在浏览哪个模块,并可以选择另外的模 ...
- shell日志删除(超容量&自动)
背景:避免双十一磁盘被打爆,本想通过crontab执行,但是删除需要密码,所以用作当机器磁盘高于摸个阈值,进行无关性日志强删 #!/bin/sh #use #sh clean.sh wmporder_ ...
- How to setup a DL4J project with eclipse
https://electronsfree.blogspot.com/2016/10/how-to-setup-dl4j-project-with-eclipse.html
- 区分javascript中的toString(),toLocaleString(),valueOf()方法
首先我们随意创建一个对象,这很简单,打开FF浏览器的Firebug切换到控制台或者打开webkit浏览器的审查元素功能. 输入以下内容: var obj1=[1,2,3,4,5] var obj2=[ ...
- jQuery实现表的编辑删除添加(增删改查)🌚
代码 : (用到了bootstrap里面的全局css样式和组件,毕竟一把梭.
- leetcode — reorder-list
/** * Source : https://oj.leetcode.com/problems/reorder-list/ * * Given a singly linked list L: L0→L ...
- gcc编译器用法
一个用c语言写的程序把他编译成计算机可执行的文件,一般有4个步骤 /*================================================================ ...
- Java的成员变量初始化
对于方法里面的成员变量,Java要求程序员强制提供一个初始化的值.比如下面这个方法就会出错: public class Breakyizhan{ public void Z(){ int z; z++ ...
- dubbo源码—service reference
service reference 在编写好服务之后,dubbo会将服务export出去,这个时候就可以编写consumer来调用这个服务了.dubbo作为一个rpc框架,使用者使用远程服务和使用本地 ...