keycloak: upstream sent too big header while reading response header from upstream

The relevant bits on how to solve this header too big error message

proxy_buffer_size 64k;
proxy_buffers 8 64k;
proxy_busy_buffers_size 64k;

For a whole keycloak listening on default port 8080 example with letsencrypt see below


server {
listen 80;
listen [::]:80;
server_name my.serv.er.name;
include /etc/nginx/acme.conf;
location / {
return 301 https://$host$request_uri;
}
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name my.serv.er.name;
ssl_certificate /etc/letsencrypt/live/my.serv.er.name/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my.serv.er.name/privkey.pem;
access_log /var/log/nginx/my.serv.er.name.access.log;
error_log /var/log/nginx/my.serv.er.name.error.log;

location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffer_size 64k;
proxy_buffers 8 64k;
proxy_busy_buffers_size 64k;
}

}

Schreib einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.