How to fix ERR_RESPONSE_HEADERS_TRUNCATED error

bubunia2000ster nginx-forum at forum.nginx.org
Sun Mar 15 13:02:28 UTC 2020


Hi all,

I am implementing a small application to test the path based routing
functionality using nginx. My set up is something as below:

User<URL in Chrome with https> ->AWS Route 53(DNS resolution) -> AWS NLB
(443)-> nginx(implements path based routing to different backend EC2
instances)------->http(backend ec2 instances)

SSL is terminated at the nginx. When I run directly this URL with
https://<domain name>:6667 it works fine and page loads properly. But
through nginx it doesnt work and I get the below
error(https://<domain-URL>/rest/).

might be temporarily down or it may have moved permanently to a new web
address.
ERR_RESPONSE_HEADERS_TRUNCATED

upstream app1 {
keepalive 16;
server test1.example.com:6666 max_fails=2 fail_timeout=300s;server
test2.example.com:6666 max_fails=2 fail_timeout=300s;
}

upstream app1_external {
sticky name=srv_id expires=1h domain=<domain-Name> httponly secure path=/;
keepalive 16;
server test1.example.com:6667 max_fails=2 fail_timeout=300s;server
test2.example.com:6667 max_fails=2 fail_timeout=300s;
}


server {
listen 443 ssl;
access_log /var/log/nginx/access.log main;
# listen [::]:443 ssl proxy_protocol;
server_name <NLB DNS> <nginx server DNS>
ssl_certificate "/etc/ssl/nginx/server.crt";
ssl_certificate_key "/etc/ssl/nginx/server.key";
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 30m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+AESGCM:EDH+AESGCM;
ssl_prefer_server_ciphers on;

location / {
proxy_pass https://app1/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_protocol_addr;
real_ip_header X-Real-IP;
proxy_http_version 1.1;
proxy_set_header Connection "";
}

location /rest/ {
proxy_pass http://app1_external/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $scheme;
real_ip_header X-Real-IP;
proxy_http_version 1.1;
proxy_set_header Connection "";
}

}

nginx version: nginx/1.13.5
Can anyone help me in this regard how to fix this issue?

Regards
Pradeep

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,287347,287347#msg-287347



More information about the nginx mailing list