Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Access Graylog Docker container on url subpath #98

Closed
tkremmel opened this issue Nov 17, 2015 · 1 comment
Closed

Access Graylog Docker container on url subpath #98

tkremmel opened this issue Nov 17, 2015 · 1 comment

Comments

@tkremmel
Copy link

I'm running graylog as a docker container with port 9000 mapped to the host. Thus I can access it via http://my-ip:9000/

Anyhow I have to serve it via https://myapp/graylog. Therefore I tried to setup nginx as a reverse proxy which passes the location /graylog to the container.

location /graylog {
      # TODO this does not work currently as graylog has no option to run on a subpath (assets are served from root)
     # Option 1: Find the option to run graylog on a subpath
     # Option 2: Run graylog on a sub sub domain
     rewrite ^/graylog/?(.*) /$1 break;
     proxy_set_header X-Real-IP  $remote_addr;
     proxy_set_header X-Forwarded-Proto $scheme;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header Host $host;
     proxy_pass http://myip:9000;
     proxy_read_timeout 90;
     proxy_redirect / /graylog/;
 }

With this setup I achieved to at least get graylog return the login site. Anyhow the assets are still loaded from http://myip/assets and not from http://myip/graylog/assets, and therefore are not served.

It seems as I have to tell graylog somehow to also serve the assets from the sub path.

In an old version of the play framework one could set this configuration value via http.path See the docs for more info.

My question is how I can configure graylog to be served from a sub path. I posted this question also on stackoverflow question.

@mariussturm
Copy link
Contributor

Hi,
you have to set the application context in order to make the web interface work on a sub-url. Take a look here: https://github.com/Graylog2/graylog2-web-interface/blob/1.3/misc/graylog-web-interface.conf.example#L26
Currently this is not supported by the Docker installation scripts. So you have edit /opt/graylog/conf/graylog-web-interface.conf manually.

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

No branches or pull requests

2 participants