在url子路径上访问Graylog Docker容器

时间:2015-11-17 17:12:01

标签: nginx docker graylog2

我试图在子路径上访问graylog。例如myapp.com/graylog。我使用NGINX作为反向代理将请求传递给/graylog到我的graylog实例。使用官方graylog docker image设置graylog实例。

我在NGINX配置中的位置:

 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/;
 }

我认为我们必须以某种方式告诉graylog它在子路径上运行。有人知道如何实现这个目标吗?

还在graylog docker repo。

打开issue

0 个答案:

没有答案