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

HAProxy / Nginx /Docker/Port #1169

Closed
coderlol opened this issue Apr 20, 2014 · 2 comments
Closed

HAProxy / Nginx /Docker/Port #1169

coderlol opened this issue Apr 20, 2014 · 2 comments
Labels
notabug When the issue is closed this label Indicates that it wasn't a bug

Comments

@coderlol
Copy link

HAProxy 1.4, nginx 1.4.7, docker 0.10.0

User --port 80-> HAProxy --10000-> Docker --8080-> Nginx hosting Kibana

Nginx runs inside Docker listening to port 8080
Docker maps port 10000 to port 8080
HAProxy listens port 80 and direct /kibana to port 10000

The problem seems to be Kibana or Nginx "rewrites/accesses" the URL and so, the user browser indicates Kibana code attempts port 8080 instead of 80.

Here is what is shown on the browser when user tries to go to 192.168.1.200/kibana

"http://192.168.1.200:8080/kibana/index.html#/dashboard/file/logstash.json"

If HAProxy also listens to port 8080, all works. If not, it won't work.

Any idea if the issue of not preserving the external port a Kibana, nginx, or HAProxy setup issue? I figure, somewhere along the path, the external/original port information got lost.

I don't think it is a HAProxy. If HAProxy is eliminated, and docker maps 8080 to nginx 8080, it works. If docker maps any other port number to nginx 8080, it won't work. Perhaps, additional HTTP headers need to be passed along to nginx. nginx only "knows" 8080...I figure...

@rashidkpc
Copy link
Contributor

I'm afraid I can't really debug this setup. Kibana doesn't rewrite the URL in any way, it will always use the URL you specify

@coderlol
Copy link
Author

Could you try Kibana behind a proxy?

User --28080--> Proxy --8080--> nginx/kibana

Key is proxy is not listening on 8080.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notabug When the issue is closed this label Indicates that it wasn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants
@rashidkpc @coderlol and others