网站首页 / 资讯 / Magento教程/ Magento2.x教程

nginx解决掉HTTP Referrer header: Length is over “4096” bytes limit

作者:admin

请尝试用

http {    # 调大客户端请求头缓冲区
    # client_header_buffer_size: 默认 1k,处理常规请求
    # large_client_header_buffers: 默认 4 8k,处理超出常规的头部
    client_header_buffer_size 16k;
    large_client_header_buffers 4 64k;    # 如果是作为反向代理,也要调大代理缓冲区
    proxy_buffer_size 64k;
    proxy_buffers 8 64k;
    proxy_busy_buffers_size 128k;
}

当然如果您有使用varnish,请检查

sudo systemctl status varnish

确保内容如

[Unit]
Description=Varnish Cache, a high-performance HTTP accelerator
After=network-online.target

[Service]
Type=forking
KillMode=process

# Maximum number of open files (for ulimit -n)
LimitNOFILE=131072

# Locked shared memory - should suffice to lock the shared memory log
# (varnishd -l argument)
# Default log size is 80MB vsl + 1M vsm + header -> 82MB
# unit is bytes
LimitMEMLOCK=85983232

# Enable this to avoid "fork failed" on reload.
TasksMax=infinity

# Maximum size of the corefile.
LimitCORE=infinity

ExecStart=/usr/sbin/varnishd -a :6081 -f /etc/varnish/default.vcl -s malloc,256m -p http_req_hdr_len=16384 -p http_resp_hdr_len=16384
ExecReload=/usr/sbin/varnishreload

[Install]
WantedBy=multi-user.target


标签: nginx
上一篇:Magento2 Varnish 混站解决方法
下一篇:M2 Paypal在结账页面出现时Place order无效

相关内容

最近更新
相关产品
综合服务邮箱: magento2#foxmail.com