Configure owncloud vhost even more like upstream suggests.

This commit is contained in:
Markus 2016-04-12 17:02:20 +02:00
parent 70c4185053
commit c8d0e43743

View File

@ -48,6 +48,12 @@ server {
rewrite ^/.well-known/carddav /remote.php/dav/ permanent; rewrite ^/.well-known/carddav /remote.php/dav/ permanent;
rewrite ^/.well-known/caldav /remote.php/dav/ permanent; rewrite ^/.well-known/caldav /remote.php/dav/ permanent;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/(build|tests|config|lib|3rdparty|templates|data)/ { location ~ ^/(build|tests|config|lib|3rdparty|templates|data)/ {
deny all; deny all;
} }
@ -72,4 +78,11 @@ server {
fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;
} }
# Adding the cache control header for js and css files
location ~* \.(?:css|js)$ {
add_header Cache-Control "public, max-age=7200";
# Don't log access to assets
access_log off;
}
} }