# Apache Reverse Proxy Docker Graylog

**URL:** https://community.graylog.org/t/apache-reverse-proxy-docker-graylog/4263
**Category:** Graylog Central (peer support)
**Created:** [February 20, 2018, 9:13pm UTC](https://community.graylog.org/t/apache-reverse-proxy-docker-graylog/4263 "2018-02-20T21:13:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![njaved](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@njaved](https://community.graylog.org/u/njaved)
#### Post date: [February 20, 2018, 9:13pm UTC](https://community.graylog.org/t/apache-reverse-proxy-docker-graylog/4263/1 "2018-02-20T21:13:57Z")

</div>

Hi ,

I am following instruction [http://docs.graylog.org/en/2.4/pages/configuration/web\_interface.html#making-the-web-interface-work-with-load-balancers-proxies](http://docs.graylog.org/en/2.4/pages/configuration/web_interface.html#making-the-web-interface-work-with-load-balancers-proxies), to setup Dockerized Graylog with Apache Reverse Proxy. However I am unable to make it work:

OHS Config:

> \<VirtualHost \*:7777\>  
> ServerName [example.com](http://example.com)  
> RewriteEngine On  
> RewriteOptions inherit  
> UseCanonicalName On  
> RewriteRule ^/$ /(different prefex) [R]
> 
> ```
> <Location /graylog>
> RequestHeader set X-Graylog-Server-URL "http://example.com/api/"
> ProxyPass http://SERVER_HOSTNAME:9000/
> ProxyPassReverse http://SERVER_HOSTNAME:9000/
> </Location>
> 
> ```

Docker Compose config:

```
graylog:
    image: graylog:latest
    container_name: graylog
    environment:
        - GRAYLOG_PASSWORD_SECRET= <SECRET>
        -GRAYLOG_ROOT_PASSWORD_SHA2= <KEY>
        - GRAYLOG_WEB_ENDPOINT_URI=http://example.com:9000/api
        - GRAYLOG_ELASTICSEARCH_HOSTS=http://elasticsearch:9200
        - GRAYLOG_ROOT_TIMEZONE=US/Eastern
        - "DISABLE_TELEMETRY: '1'"
        - GRAYLOG_ROTATION_STRATEGY=time
        - GRAYLOG_ELASTICSEARCH_MAX_TIME_PER_INDEX=1d
        - GRAYLOG_MAX_NUMBER_OF_INDICES=20
    links:
        - mongodb:mongo
        - elasticsearch
    depends_on:
        - mongodb
        - elasticsearch
    expose:
        - 9000
    ports:
        - 9000:9000
        - 514:514
        - 514:514/udp
        - 1513:1513
        - 1513:1513/udp
        - 12900:12900
        - 12900:12900/udp

```

I still can’t reach [http://example.com/graylog](http://example.com/graylog). Any help would be appreciated

---

<div class="post-metadata">

### Author: ![njaved](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@njaved](https://community.graylog.org/u/njaved)
#### Post date: [February 21, 2018, 3:37am UTC](https://community.graylog.org/t/apache-reverse-proxy-docker-graylog/4263/2 "2018-02-21T03:37:45Z")

</div>

Update:

I updated OHS config:

```
<Location />
    RequestHeader set X-Graylog-Server-URL "http://example.com/api/"
    ProxyPass http://SERVER_HOSTNAME:9000/
    ProxyPassReverse http:///SERVER_HOSTNAME:9000/
</Location>

```

Docker Config:

```
graylog:
    image: graylog:latest
    container_name: graylog
    environment:
        - GRAYLOG_WEB_ENDPOINT_URI=http://example.com:9000/api/
        - GRAYLOG_ELASTICSEARCH_HOSTS=http://elasticsearch:9200
        - GRAYLOG_ROOT_TIMEZONE=US/Eastern
        - "DISABLE_TELEMETRY: '1'"
        - GRAYLOG_ROTATION_STRATEGY=time
        - GRAYLOG_ELASTICSEARCH_MAX_TIME_PER_INDEX=1d
        - GRAYLOG_MAX_NUMBER_OF_INDICES=20

```

Now this gives me an error below when I hit [example.com/graylog](http://example.com/graylog)

> Error message  
> cannot GET [http://example.com/api/](http://example.com/api/) (502)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)
#### Post date: [March 7, 2018, 3:37am UTC](https://community.graylog.org/t/apache-reverse-proxy-docker-graylog/4263/3 "2018-03-07T03:37:54Z")

</div>

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