# Graylog with NGINX

**URL:** https://community.graylog.org/t/graylog-with-nginx/32402
**Category:** Graylog Central (peer support)
**Tags:** html
**Created:** [May 14, 2024, 12:06pm UTC](https://community.graylog.org/t/graylog-with-nginx/32402 "2024-05-14T12:06:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![muellerf](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@muellerf](https://community.graylog.org/u/muellerf)
#### Post date: [May 14, 2024, 12:06pm UTC](https://community.graylog.org/t/graylog-with-nginx/32402/1 "2024-05-14T12:06:38Z")

</div>

**1. Describe your incident:**  
Hi,

i installed a new ubuntu server with graylog and nginx according to instructions. Install went fine but i cannot use the nginx as a proxy.

Graylog work well if i configure http\_bind\_address to the ip of the server. When configure to localhost and use nginx to redirect i cannot log-in.

I see a error-message “Could not load stream - Loading streams failed with status: Fetch Error: There was an error fetching a resource: Unauthorized. Additional information: Not available”

I see following Error in chrome Developer:Tool

Request URL:[http://graylog.domain.de/api/system/sessions](http://graylog.domain.de/api/system/sessions)  
Request Method:  
POST  
Status Code:  
401 Unauthorized  
Remote Address:  
172.x.x.x:80  
Referrer Policy:  
strict-origin-when-cross-origin

**2. Describe your environment:**

- OS Information: Ubuntu 22.04.4

- Package Version: graylog-server 6.0.0-14  
nginx 1.18.0-6ubuntu14.4

- Service logs, configurations, and environment variables:  
Installed all according instructions

**3. What steps have you already taken to try and solve the problem?**  
I only change the http\_bind\_address from 127.0.0.1:9000 to the ip:9000. It should be a nginx problem.

server  
{  
listen 80 default\_server;  
listen [::]:80 default\_server;  
server\_name [graylog.domain.de](http://graylog.domain.de);

```
location / {
  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/;
  proxy_pass http://127.0.0.1:9000;
}

```

}

**4. How can the community help?**  
Hope you can give me a hint to solve the problem

---

<div class="post-metadata">

### Author: ![muellerf](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@muellerf](https://community.graylog.org/u/muellerf)
#### Post date: [May 15, 2024, 1:17pm UTC](https://community.graylog.org/t/graylog-with-nginx/32402/2 "2024-05-15T13:17:36Z")

</div>

Only the login process does not work. If I configure the graylog server with an IP and not with localhost and thus bypass the proxy, the login works. If I now configure everything back again and use the proxy again, graylog works as long as I remain logged in.

---

<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: [May 29, 2024, 1:18pm UTC](https://community.graylog.org/t/graylog-with-nginx/32402/3 "2024-05-29T13:18:33Z")

</div>

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