Last active
October 6, 2018 20:38
-
-
Save h00s/2bf160f66ebad402af611944bf359863 to your computer and use it in GitHub Desktop.
Nginx conf reverse proxy for Rails 5.2.1 Puma with SSL
This file contains 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
location @app { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://app_upstream; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
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