Created
January 24, 2013 15:07
-
-
Save graue/4622755 to your computer and use it in GitHub Desktop.
Potsfyi nginx proxying config
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 potsfyi { | |
server 127.0.0.1:8000 fail_timeout=0; | |
} | |
server { | |
listen 4004; | |
server_name _; | |
keepalive_timeout 10; | |
location / { | |
proxy_pass http://potsfyi; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
location /static/ { | |
root /home/pi/code/potsfyi; # allows access only to 'static' subdir | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to modify line 12:
to get the port right, otherwise some redirects were breaking.