2

We have supervisord [inet_http_server] running on 127.0.0.1:9001.

When we're trying to place it behind nginx - supervisord logtail stops working.

Supervisord settings:

[inet_http_server]
port = 127.0.0.1:9001

Nginx settings:

server {
    listen 80;
    server_name server.com;
    location / {
        proxy_pass http://127.0.0.1:9001/;
    }
}

Where to dig? (Stop | Start | Restart) commands working, only tail command not working.

3

This is by design, since nginx waits until it gets the whole reply from the backend, prior to sending a response back to the client -- proxy buffering is enabled by default.

This would resolve your issue:

proxy_buffering off;
3

For me adding the following lines worked: proxy_http_version 1.1; and proxy_set_header Connection "";

My complete working config proxying supervisor output with web based tail-f working:

server {
  listen 9000;
  listen [::]:9000;

  server_name server.gmetri.com;

  location / {
    proxy_pass http://localhost:4001;
    proxy_http_version 1.1;
    proxy_buffering     off;
    proxy_max_temp_file_size 0;
    proxy_redirect     default;
    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   Connection       "";
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.