Hi guys,
I used nginx(compile from source) load balancing for 2 graylog nodes.
Here is my nginx config file:
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/ (520)"
How can I fix it?
Thanks,