-
-
Save nextsummer33/5983196 to your computer and use it in GitHub Desktop.
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
server { | |
listen 80; | |
server_name server_name; | |
access_log /var/log/app/access.log; | |
error_log /var/log/app/error.log; | |
# https://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-$ | |
location /static { # STATIC_URL | |
alias /path/to/app/static; # STATIC_R$ | |
} | |
location /media { # MEDIA_URL | |
alias /path/to/app/media; # MEDIA_ROOT | |
} | |
location ~* \.(?:icon|css|js|gif|jpe?g|png)$ { | |
expires 30d; | |
access_log off; | |
} | |
root /path/to/app/public; | |
location / { | |
include uwsgi_params; | |
uwsgi_param UWSGI_SCRIPT app; | |
uwsgi_pass 127.0.0.1:8080; | |
} | |
error_page 404 errors/404.html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment