Welcome! Log In Create A New Profile

Advanced

How to fix ERR_RESPONSE_HEADERS_TRUNCATED error

March 15, 2020 09:02AM
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
Subject Author Posted

How to fix ERR_RESPONSE_HEADERS_TRUNCATED error

bubunia2000ster March 15, 2020 09:02AM

Re: How to fix ERR_RESPONSE_HEADERS_TRUNCATED error

Francis Daly March 15, 2020 09:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 125
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready