502 Bad Gateway error is shown while accessing password-protected directory: upstream prematurely closed connection

Refers to:

  • Plesk 10.4 for Windows
  • Plesk for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

Created:

2016-11-16 12:41:37 UTC

Modified:

2017-02-20 07:24:22 UTC

0

Was this article helpful?


Have more questions?

Submit a request

502 Bad Gateway error is shown while accessing password-protected directory: upstream prematurely closed connection

Symptoms

While accessing a protected directory in a web browser, it fails with 502 Bad Gateway error after entering the login and password.

2013/07/31 23:59:27 [error] 3671#0: *209872 upstream prematurely closed connection while reading response header from upstream, 
client: 10.20.30.40, server: example.com, request: "GET /download/debian/ HTTP/1.1", upstream: "http://10.20.30.40:7080/download/debian/",
host: "example.com"

Cause

This failure occurs due to timeout.

Resolution

  1. Add the following lines to /etc/nginx/nginx.conf :

    http{
    ...
    fastcgi_buffers 8 128k;
    fastcgi_buffer_size 256k;
    ...
    }
  2. Restart Nginx service:

    ~# service nginx restart
Have more questions? Submit a request
Please sign in to leave a comment.