Skip to content

Instantly share code, notes, and snippets.

@rajasimon
Created November 5, 2018 13:10
Show Gist options
  • Save rajasimon/8760ec8a6bf41d557466e88643ecd4e3 to your computer and use it in GitHub Desktop.
Save rajasimon/8760ec8a6bf41d557466e88643ecd4e3 to your computer and use it in GitHub Desktop.
Nginx configuration
http {
upstream alert {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response
# Unix domain servers
server unix:/tmp/hnalert_1.sock fail_timeout=0;
server unix:/tmp/hnalert_2.sock fail_timeout=0;
server unix:/tmp/hnalert_3.sock fail_timeout=0;
server unix:/tmp/hnalert_4.sock fail_timeout=0;
# Unix domain sockets are used in this example due to their high performance,
# but TCP/IP sockets could be used instead:
# server 127.0.0.1:8081 fail_timeout=0;
# server 127.0.0.1:8082 fail_timeout=0;
# server 127.0.0.1:8083 fail_timeout=0;
# server 127.0.0.1:8084 fail_timeout=0;
}
server {
listen 80;
client_max_body_size 4G;
server_name myiphere;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://alert;
}
location /static {
# path for static files
root /mylocation/static;
}
}
}
@MarAvFe
Copy link

MarAvFe commented Nov 5, 2018

Elaborate a little more. Why is it wrong? What is happening and what do you expect to happen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment