# The server returned: 404 - cannot POST

**URL:** https://community.graylog.org/t/the-server-returned-404-cannot-post/6176
**Category:** Graylog Central (peer support)
**Created:** [July 30, 2018, 4:23pm UTC](https://community.graylog.org/t/the-server-returned-404-cannot-post/6176 "2018-07-30T16:23:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rpelissi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/rpelissi/32/2686_2.png) [@rpelissi](https://community.graylog.org/u/rpelissi)
#### Post date: [July 30, 2018, 4:23pm UTC](https://community.graylog.org/t/the-server-returned-404-cannot-post/6176/1 "2018-07-30T16:23:13Z")

</div>

Hi all!  
I know this issue has been created in several other post but I am not sure the fix is the same…  
So in fact I have set those 2 settings:

rest\_listen\_uri = [http://192.168.1.10:9000/api/](http://192.168.1.10:9000/api/)  
web\_listen\_uri = [http://192.168.1.10:8000/](http://192.168.1.10:8000/)

I need the rest api to be on a specific IP because I use the filebeat sidecar  
I also set the web interface to an ip ans a port to reach it instead of using a tunnel.  
My issue is when I use nginx to access the web interface. This is what I have from the doc:

> server  
> {  
> listen 80 default\_server;  
> listen [::]:80 default\_server ipv6only=on;  
> server\_name 192.168.1.10;
> 
> ```
> 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 http://$server_name/api;
> proxy_pass http://192.168.1.10:8000;
> }
> 
> ```
> 
> }

With this setting, I got the issue of 404 - cannot POST.

Any advice on this?  
Note that I am using graylog server 2.4.6 and sidecar 0.1.6 installed onto another host.

**Update**  
I have tested with:  
web\_listen\_uri = [http://127.0.0.1:8000/](http://127.0.0.1:8000/)  
and  
proxy\_pass [http://127.0.0.1:8000](http://127.0.0.1:8000)

and got the same issue…

**Possible FIX**

This nginx config seems to work!! (ref: [API browser (Swagger interface) does not work with AWS appliance · Issue #3519 · Graylog2/graylog2-server · GitHub](https://github.com/Graylog2/graylog2-server/issues/3519#issuecomment-336631052))

> server  
> {  
> listen 80 default\_server;  
> listen [::]:80 default\_server ipv6only=on;  
> server\_name 172.31.254.42;
> 
> ```
> location / {
> proxy_set_header Host $http_host;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_pass http://192.168.1.10:8000;
> }
> 
> ```
> 
> }

Thanks!

---

<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: [August 7, 2018, 10:36am UTC](https://community.graylog.org/t/the-server-returned-404-cannot-post/6176/2 "2018-08-07T10:36:58Z")

</div>

What Version of Graylog did you use?

Did you checked running API and Web on the same port?

Check that part of the configuration: [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)

check the settings that are assumed in the examples and adjust that to your configuration - or change the configuration to the examples.

---

<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: [August 21, 2018, 10:46am UTC](https://community.graylog.org/t/the-server-returned-404-cannot-post/6176/3 "2018-08-21T10:46:00Z")

</div>

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