Created
November 5, 2018 13:10
-
-
Save rajasimon/8760ec8a6bf41d557466e88643ecd4e3 to your computer and use it in GitHub Desktop.
Nginx configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Elaborate a little more. Why is it wrong? What is happening and what do you expect to happen?