Last active
August 29, 2015 14:00
-
-
Save joar/1bb03c0c4890b985a973 to your computer and use it in GitHub Desktop.
How to get rid of 127.0.0.1 in your generated links
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
server { | |
# [...] | |
location / { | |
set $backend_url 'http://127.0.0.1:8000'; | |
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_set_header X-NginX-Proxy true; | |
proxy_pass $backend_url; | |
proxy_redirect $backend_url https://$server_name/; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment