Created
July 15, 2014 14:40
-
-
Save scragg0x/738f144b33d17ef763d1 to your computer and use it in GitHub Desktop.
Nginx proxy
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
# This looks like a infinite loop but it proxy requests sent | |
# to the 'old' webserver during dns propagation to the new one. | |
# Make sure the webserver with this code knows the updated | |
# IP for the domain by adding a record to /etc/hosts | |
server { | |
listen 80; | |
server_name domain.com; | |
location / { | |
proxy_pass http://domain.com; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment