Ubuntu Pastebin

Paste from kwm at Fri, 3 Nov 2017 16:35:51 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
For example, you could use the following as a graylog vhost template for the apache2 charm:

```
$ cat ./graylog-vhost.tmpl
<Location "/">
    RequestHeader set X-Graylog-Server-URL "http://{{servername}}/api/"
    ProxyPass http://{{graylog_web}}/
    ProxyPassReverse http://{{graylog_web}}/
</Location>

<Location "/api/">
    ProxyPass http://{{graylog_api}}/api/
    ProxyPassReverse http://{{graylog_api}}/api/
</Location>
```

Now deploy and configure apache2 as your graylog reverse proxy:

```
juju deploy apache2
juju config apache2 "vhost_http_template=$(base64 < graylog-vhost.tmpl)"
juju config apache2 "enable_modules='headers proxy_html proxy_http'"
juju expose apache2
juju relate apache2:reverseproxy graylog
```

Visit http://<apache2-public-ip> to access the Graylog interface.
Download as text