博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
the server responded with a status of 414 (Request-URI Too Large)
阅读量:7033 次
发布时间:2019-06-28

本文共 1142 字,大约阅读时间需要 3 分钟。

 

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.

 

转载地址:http://rjyal.baihongyu.com/

你可能感兴趣的文章
致网名为huashichun 或DLINKDIR602 朋友的一封信
查看>>
bash:command not found
查看>>
oracle 11g数据库(表)的逻辑备份与恢复
查看>>
JavaScript prototype
查看>>
Linux下安装apache可能遇到的问题总结
查看>>
实用SublimeText插件介绍与使用演示
查看>>
PLSQL中文乱码问题
查看>>
Ubuntu 改鼠标侧键为ctrl,并配合滚轮实现页面缩放
查看>>
centos6.5 pxe kickstart 批量部署
查看>>
android开发之splash闪屏页判断是否第一次进入app代码
查看>>
Linux建立回收站
查看>>
Git 多人协作
查看>>
C#基础系列:反射笔记
查看>>
遍历hashMap、hashSet、Hashtable
查看>>
5.7 ibtmp1问题诊断
查看>>
我的友情链接
查看>>
centos6.5编译安装mysql5.6.14
查看>>
7.5路由器与交换机的故障恢复
查看>>
innodb_flusn_log_at_trx_commit和rsync_binlog参数详解
查看>>
报错EnvironmentError: mysql_config not found
查看>>