Created
April 21, 2015 13:28
-
-
Save OlofFredriksson/c3755ff9250ac722e6c3 to your computer and use it in GitHub Desktop.
Simple Nginx conf for Django
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 localhost { | |
server localhost:8000; | |
} | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
server_name localhost; | |
location / { | |
proxy_pass http://localhost; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
} | |
location /static { | |
root /opt/static; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment