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 () 但是其他页面正常显示: 原因: 浏览器看一下: ...
随机推荐
- NET Framework 版本和依赖关系
原文:https://docs.microsoft.com/zh-cn/dotnet/framework/migration-guide/versions-and-dependencies 每个版本的 ...
- lesson - 12 Linux系统日常管理1
监控系统状态 – w, vmstat命令w, uptimesystem load averages 单位时间段内活动的进程数 查看cpu的个数和核数vmstat 1vmstat 1 10vmstat各 ...
- TensorFlow 代码行统计
https://github.com/tensorflow/tensorflow.git
- Struts2-整理笔记(四)Action生命周期、如何获取参数(3种)、集合类型参数封装
一.Action生命周期 每次请求到来时,都会创建一个新的Action实例 Action是线程安全的,可以使用成员变量接收参数 二.获取参数的方式(3种) 1.属性驱动获得参数 每次请求Action时 ...
- [编织消息框架][JAVA核心技术]cglib动态代理
先在mavne项目里添加cglib库 maven仓库搜索cglib版本 maven地址:http://mvnrepository.com/ 点击最新的版本 3.2.5 复制到pom.xml depe ...
- jQuery Ajax post多个值传参
http://blog.csdn.net/wang8559422/article/details/42394839 data:'id='+data+'&val='+val 加&符 ...
- python中的if __name__=='__main__': main()解析
python中我们会看到一段代码是这样的: if __name__=='__main__': main() 这段代码的什么意思,我们可以知道代码的意思是如果__name__=='__main__'为T ...
- Python核心编程笔记--私有化
一.私有化的实现 在Python中想定义一个类是比较简单的,比如要定义一个Person类,如下代码即可: # -*- coding: utf-8 -*- # __author : Demon # da ...
- angular4.0使用sass
一.为什么选择sass为了更好的管理代码,我们需要可以定义变量,同时可以使用函数的样式工具,比如定义公用color.bg.显然css无法满足需求.现在市面上常用的是sass.less.经过比较,我选择 ...
- 多行文字水平垂直居中在div
<BODY> <div class="box"> <h3>1.单行文字居中</h3> <!--设置行高来实现- ...