# Web Server Error API

**URL:** <https://community.graylog.org/t/web-server-error-api/751>\
**Category:** Development\
**Created:** [April 8, 2017, 8:57am UTC](https://community.graylog.org/t/web-server-error-api/751 "2017-04-08T08:57:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kieulam141](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/kieulam141/32/931_2.png) [@kieulam141](https://community.graylog.org/u/kieulam141)\
**Post date:** [April 8, 2017, 8:57am UTC](https://community.graylog.org/t/web-server-error-api/751/1 "2017-04-08T08:57:38Z")

</div>

Hi guys,  
I used nginx(compile from source) load balancing for 2 graylog nodes.  
Here is my nginx config file:

```auto
server {
	listen 80;
	server_name xxx;

    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://xxx/api/;
    proxy_pass http://graylog-web-cluster;
}
}

upstream graylog-web-cluster {
	server graylog1.xxx:9000 max_fails=3 fail_timeout=30s;
	server graylog2.xxx:9000 max_fails=3 fail_timeout=30s;
}

```

But my graylog web server is not stability, sometime up, sometime down.  
And It’s error is "Error: cannot GET [http://xxx/api/](http://xxx/api/) (520)"  
How can I fix it?  
Thanks,

---

<div class="post-metadata">

**Author:** ![kieulam141](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/kieulam141/32/931_2.png) [@kieulam141](https://community.graylog.org/u/kieulam141)\
**Post date:** [April 10, 2017, 2:45am UTC](https://community.graylog.org/t/web-server-error-api/751/2 "2017-04-10T02:45:57Z")

</div>

@jochen help me, pls.

---

<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:** [April 10, 2017, 7:46am UTC](https://community.graylog.org/t/web-server-error-api/751/3 "2017-04-10T07:46:42Z")

</div>

Hej

you might want to look [here in this posting](https://community.graylog.org/t/load-balancing-nginx-with-ip-private-in-lan/665/2?u=jan) or [in the documentation](http://docs.graylog.org/en/2.2/pages/configuration/web_interface.html#nginx) to find how this works.

A first view did not reveal any issues with the configuration, you need to debug and find in the log files why this happens.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [April 10, 2017, 7:48am UTC](https://community.graylog.org/t/web-server-error-api/751/4 "2017-04-10T07:48:14Z")

</div>

If you need specific SLA for your Graylog installation, consider buying [professional support](https://www.graylog.org/professional-support). Other than that the community support is being performed on a best-effort basis **and it’s not a personal support service**.
