# Nginx Reverse Proxy +HTTPS with Graylog 3.0 on subdirectory (e.g., server.com/graylog)

**URL:** <https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581>\
**Category:** Graylog Central (peer support)\
**Created:** [January 29, 2019, 4:31pm UTC](https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581 "2019-01-29T16:31:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmm5247](https://avatars.discourse-cdn.com/v4/letter/l/ecccb3/32.png) [@lmm5247](https://community.graylog.org/u/lmm5247)\
**Post date:** [January 29, 2019, 4:31pm UTC](https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581/1 "2019-01-29T16:31:44Z")

</div>

I have Graylog setup and running and can access it on the server’s IP (e.g., 10.10.2.29:9000).

I’d rather not install Nginx on the Graylog server, since I have a separate server that is running Nginx with Let’s Encrypt and a reverse proxy. I can successfully access other services with this reverse proxy.

I would like to setup Graylog to run on a subdirectory (e.g., [https://nginx02.internal.server.com/graylog](https://nginx02.internal.server.com/graylog)). I’ve seen [these examples](http://docs.graylog.org/en/3.0/pages/configuration/web_interface.html#nginx), but I don’t know what to set in the Graylog server.conf file to make this work.

My applicable server.conf settings (I can post the entire config if needed).  
`http_bind_address = 10.10.2.29:9000`

My Nginx config. Do I have the correct settings here?

```
server {
  listen 443 ssl http2;
  server_name internal.server.com;

  #SSL/TLS settings
  include /etc/nginx/sites-available/_ssl.conf;
  ssl_certificate /etc/letsencrypt/live/internal.server.com/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/internal.server.com/privkey.pem;
  ssl_dhparam /etc/nginx/ssl/nginx02/dhparam4096.pem;

  root /var/www/dashboard;
  autoindex off;
  index index.php index.html;

  location /graylog/ {
      proxy_set_header Host $http_host;
      proxy_set_header X-Forwarded-Host $host;
      proxy_set_header X-Forwarded-Server $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Graylog-Server-URL https://$server_name/graylog/;
      rewrite ^/graylog/(.*)$ /$1 break;
      proxy_pass http://10.10.2.29:9000;
  }

}
```

---

<div class="post-metadata">

**Author:** ![pterodaktysz](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pterodaktysz](https://community.graylog.org/u/pterodaktysz)\
**Post date:** [January 30, 2019, 10:18am UTC](https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581/3 "2019-01-30T10:18:04Z")

</div>

I’m having exactly the same problem.

---

<div class="post-metadata">

**Author:** ![kotecek](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@kotecek](https://community.graylog.org/u/kotecek)\
**Post date:** [February 4, 2019, 10:52am UTC](https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581/4 "2019-02-04T10:52:29Z")

</div>

Same issue here. Does anyone know how to solve this?

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [February 4, 2019, 11:07am UTC](https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581/5 "2019-02-04T11:07:19Z")

</div>

this is a documentation issue - what will be hopefully fixed in the next week.

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [February 15, 2019, 9:41am UTC](https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581/7 "2019-02-15T09:41:24Z")

</div>

nope - not yet updated.

---

<div class="post-metadata">

**Author:** ![knobbysideup](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@knobbysideup](https://community.graylog.org/u/knobbysideup)\
**Post date:** [February 18, 2019, 3:31pm UTC](https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581/8 "2019-02-18T15:31:36Z")

</div>

FWIW, I have some issues proxying this way with apache as well. Everything works fine except for everything under the ‘‘System’’ menu. Everything there adds an extra ‘’/graylog/’’ to the path in the returned html. See [https://github.com/Graylog2/graylog2-server/issues/5610#issue-403893017](https://github.com/Graylog2/graylog2-server/issues/5610#issue-403893017)

Here is the relevant part of my apache config:

```
<Location /graylog>
    RequestHeader set X-Graylog-Server-URL "https://$public/graylog/"
    ProxyPass http://$private:9000
    ProxyPassReverse http://$private:9000
</Location>

```

I could possibly address this with a rewrite, but I’d rather not if there is something going on with the code that generates the system menu.

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [February 20, 2019, 4:40pm UTC](https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581/9 "2019-02-20T16:40:03Z")

</div>

I have created an issue for that:

> <https://github.com/Graylog2/graylog2-server/issues/5702>

---

<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 6, 2019, 4:45pm UTC](https://community.graylog.org/t/nginx-reverse-proxy-https-with-graylog-3-0-on-subdirectory-e-g-server-com-graylog/8581/10 "2019-03-06T16:45:00Z")

</div>

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