init
This commit is contained in:
26
nginx-static.conf
Normal file
26
nginx-static.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
# Django collected static files
|
||||
location /static/ {
|
||||
alias /var/www/static/;
|
||||
access_log off;
|
||||
expires 30d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# Django media (user uploads)
|
||||
location /media/ {
|
||||
alias /var/www/media/;
|
||||
access_log off;
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# No dotfiles
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user