Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Horizon admin guide with nginx setup instructions #242

Closed
bartekn opened this issue Jan 10, 2018 · 5 comments
Closed

Update Horizon admin guide with nginx setup instructions #242

bartekn opened this issue Jan 10, 2018 · 5 comments

Comments

@bartekn
Copy link
Contributor

bartekn commented Jan 10, 2018

Nginx has to be configured correctly for event source streams: https://serverfault.com/a/801629

@khelle
Copy link

khelle commented Feb 13, 2018

What exactly needs to be configured? I tried doing proxy via Nginx but without success, this is my nginx config file I tried according to the link @bartekn posted.

server {
  listen 14040 ssl default_server;
  server_name _;
  ssl_certificate /etc/nginx/ssl/nginx.crt;
  ssl_certificate_key /etc/nginx/ssl/nginx.key;
  underscores_in_headers on;

  location / {
    auth_basic "Restricted Content";
    auth_basic_user_file /etc/nginx/.htpasswd;
    proxy_http_version 1.1;
    proxy_read_timeout 300;
    proxy_set_header  Host $host;
    proxy_set_header  Connection "";
    proxy_set_header  Cache-Control no-cache;
    proxy_set_header  Transfer-Encoding chunked;
    proxy_set_header  X-Real-IP $remote_addr;
    proxy_set_header  X-Forwarded-Proto https;
    proxy_set_header  X-Forwarded-For $remote_addr;
    proxy_set_header  X-Forwarded-Host $remote_addr;
    proxy_set_header  X-Accel-Buffering no;
    proxy_pass        https://localhost:15040;
    proxy_pass_request_headers on;
  }
}

I am getting ECONNREFUSED regardless If I set Connection, Cache-Control or X-Accel-Buffering. The only option that seems to matter is Transfer-Encoding - if I set it to chunked I get TIMEOUT instead of CONN REFUSED. When I try to access horizon directly (using port 15040 instead of proxy's 14040) everything works fine.

@bartekn
Copy link
Contributor Author

bartekn commented Feb 13, 2018

Please use our StackExchange for questions.

@howardtw
Copy link
Contributor

What's the status of this issue @bartekn ?

@bartekn
Copy link
Contributor Author

bartekn commented Apr 23, 2019

@howardtw not done. We need to explain this in Horizon admin guide.

@ChrisRut
Copy link

ChrisRut commented Jan 3, 2020

I had to add proxy_buffering off; in order for it to play nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants
@ChrisRut @bartekn @mollykarcher @2opremio @khelle @howardtw and others