How to get graylog running behind a proxy?

I need to host my Graylog URL using proxy server i.e haproxy

i am trying to use Private_IP:9000 in haproxy

backend graylog_cluster
mode http
option http-keep-alive
balance roundrobin
option forwardfor
cookie JSESSIONID prefix

    server graylog01 Private-IP:9000 cookie A check

I am able to telnet the from my proxy server ( haproxy )
Private_IP:9000

Please help !!
Thanks

No worry, issue has been resolved now :slight_smile:

it would be pleaseful if you would share with the community how you have solved your issue and what had helped you!

thanks
Jan

sure @jan :slight_smile: I did the following things…
frontend http
bind 0.0.0.0:80

option forwardfor
http-request add-header X-Forwarded-Host %[req.hdr(host)]
http-request add-header X-Forwarded-Server %[req.hdr(host)]
http-request add-header X-Forwarded-Port %[dst_port]
acl is_graylog hdr_dom(host) -i -m str graylog_url_domain
use_backend     graylog if is_graylog

backend graylog
description The Graylog Web backend.
http-request set-header X-Graylog-Server-URL https://graylog_url_domain/api
use-server graylog_1
server graylog_1 Private_IP:9000 maxconn 20 check

I got these details in graylog doc.

http://docs.graylog.org/en/2.4/pages/configuration/web_interface.html#haproxy-1-6

I used lets-encrypt to enable ssl

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.