forked from leftypol/leftypol
docker: extract the vichan directory and make it optionally exposable
This commit is contained in:
parent
6ba2c7cf42
commit
df7d7e1d3c
6 changed files with 147 additions and 41 deletions
|
@ -6,7 +6,7 @@ server {
|
|||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
server_name leftypol;
|
||||
root /var/www;
|
||||
root /var/www/html;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
|
@ -15,9 +15,24 @@ server {
|
|||
charset utf-8;
|
||||
|
||||
location ~ ^([^.\?]*[^\/])$ {
|
||||
try_files $uri @addslash;
|
||||
try_files $uri @addslash;
|
||||
}
|
||||
|
||||
# Expire rules for static content
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
# CSS and Javascript
|
||||
location ~* \.(?:css|js)$ {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
# Expire rules for static content
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
|
||||
|
@ -39,7 +54,7 @@ server {
|
|||
}
|
||||
|
||||
location @addslash {
|
||||
return 301 $uri/;
|
||||
return 301 $uri/;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue