【待反馈】请求参数比较大,Nginx缓冲区溢出
为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:7.9.6系统版本:Ubuntu 20.04.4 LTS x86_64(Py3.7.9)
问题描述:请求参数比较大,Nginx缓冲区溢出
相关截图(日志、错误):<html><meta charset="utf-8" /><title>Nginx缓冲区溢出</title><div>宝塔免费WAF提醒您,Nginx缓冲区溢出,传递的参数超过接受参数的大小,出现异常,<br>第一种解决方案:把当前url-->^/test/prod-api/beiyao-openapi/openApi/wtDelivery/createSupplier加入到URL白名单中</br>第二种解决方案:面板-->nginx管理->性能调整-->client_body_buffer_size的值调整为10240K 或者5024K(PS:可能会一直请求失败建议加入白名单)</br></div></html>
调整了client_body_buffer_size的值调整为10240K 或者5024K,都未成功,URL白名单是在宝塔上设置吗?没找到 默认是没有这个值的,要手动添加
http {
client_body_buffer_size 16k;
server {
listen 80;
server_name example.com;
location / {
root /var/www/html;
index index.html index.htm;
}
location /upload {
client_body_buffer_size 16k;
}
}
}
userwww www;
worker_processes auto;
error_log/www/wwwlogs/nginx_error.logcrit;
pid /www/server/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;
stream {
log_format tcp_format '$time_local|$remote_addr|$protocol|$status|$bytes_sent|$bytes_received|$session_time|$upstream_addr|$upstream_bytes_sent|$upstream_bytes_received|$upstream_connect_time';
access_log /www/wwwlogs/tcp-access.log tcp_format;
error_log /www/wwwlogs/tcp-error.log;
include /www/server/panel/vhost/nginx/tcp/*.conf;
}
events
{
use epoll;
worker_connections 51200;
multi_accept on;
}
http {
client_body_buffer_size 16k;
server {
listen 80;
server_name example.com;
location / {
root /var/www/html;
index index.html index.htm;
}
location /upload {
client_body_buffer_size 16k;
}
}
}
http
{
include mime.types;
#include luawaf.conf;
include proxy.conf;
default_typeapplication/octet-stream;
server_names_hash_bucket_size 512;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
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 256k;
fastcgi_intercept_errors on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/json image/jpeg image/gif image/png font/ttf font/otf image/svg+xml application/xml+rss text/x-js;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE \.";
limit_conn_zone $binary_remote_addr zone=perip:10m;
limit_conn_zone $server_name zone=perserver:10m;
server_tokens off;
access_log off;
server
{
listen 888;
server_name phpmyadmin;
index index.html index.htm index.php;
root/www/server/phpmyadmin;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log/www/wwwlogs/access.log;
}
include /www/server/panel/vhost/nginx/*.conf;
}
报错
https://lnby-zt.oss-cn-zhangjiakou.aliyuncs.com/tms/%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17195414252675.png 宝塔用户_qjohlj 发表于 2024-6-28 10:34
userwww www;
worker_processes auto;
error_log/www/wwwlogs/nginx_error.logcrit;
您好,您遇到的问题是由于在您的 Nginx 配置文件 /www/server/nginx/conf/nginx.conf 中在第 40 行附近存在重复的 "http" 指令导致的。Nginx 在加载配置文件时要求每个指令只能出现一次,
您这边是重复定义了http模块 宝塔用户_qjohlj 发表于 2024-6-28 10:34
userwww www;
worker_processes auto;
error_log/www/wwwlogs/nginx_error.logcrit;
您好,您有提示是免费WAF提示到,这个url添加白名单应该在您面板左侧列表中有个黑白名单 运维技术阿闯 发表于 2024-6-28 11:59
您好,您有提示是免费WAF提示到,这个url添加白名单应该在您面板左侧列表中有个黑白名单 ...
您好,没找到白名单https://lnby-zt.oss-cn-zhangjiakou.aliyuncs.com/tms/%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_171955533789.png 宝塔用户_qjohlj 发表于 2024-6-28 14:18
您好,没找到白名单
您好,您是安装了免费nginx防火墙,这个它不是我们开发的
您可以点开他后找全局配置,里边可以查看一下,有个url白名单 运维技术阿闯 发表于 2024-6-28 15:11
您好,您是安装了免费nginx防火墙,这个它不是我们开发的
您可以点开他后找全局配置,里边可以查看一下, ...
已经卸载nginx免费防火墙还是提示Nginx缓冲区溢出https://lnby-zt.oss-cn-zhangjiakou.aliyuncs.com/tms/%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17206893066307.png https://lnby-zt.oss-cn-zhangjiakou.aliyuncs.com/tms/%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17206893292711.png 宝塔用户_qjohlj 发表于 2024-7-11 17:17
已经卸载nginx免费防火墙还是提示Nginx缓冲区溢出
您好,您这这边可以参考一下这个链接给nginx做一下设置
https://blog.csdn.net/weixin_69899223/article/details/125226228
页:
[1]