Created
June 6, 2020 21:07
-
-
Save Turupawn/e37090771a6f17c6a9487003c19e26f4 to your computer and use it in GitHub Desktop.
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
upstream thin { | |
server 127.0.0.1:3000; | |
} | |
server { | |
server_name balancer.todolegal.app; | |
listen 80; | |
listen [::]:80; | |
access_log /var/log/nginx/reverse-access.log; | |
error_log /var/log/nginx/reverse-error.log; | |
location / { | |
proxy_pass http://thin; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-Ssl on; # Optional | |
proxy_set_header X-Forwarded-Port $server_port; | |
proxy_set_header X-Forwarded-Host $host; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment