update nginx.conf

This commit is contained in:
Wonderfall 2021-03-25 19:55:19 +01:00
parent c5e2e9cab9
commit 939d964275

View File

@ -41,12 +41,12 @@ server {
rewrite ^ /index.php$uri; rewrite ^ /index.php$uri;
} }
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) {
deny all; return 404;
} }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all; return 404;
} }
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) { location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
@ -67,8 +67,15 @@ server {
index index.php; index index.php;
} }
location ~ \.(?:css|js|woff2?|svg|gif|map)$ { location ~ \.(?:css|js|svg|gif|map)$ {
try_files $uri /index.php$uri$is_args$args; try_files $uri /index.php$uri$is_args$args;
expires 6M;
access_log off;
}
location ~ \.woff2?$ {
try_files $uri /index.php$uri$is_args$args;
expires 7d;
access_log off; access_log off;
} }