diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2020-05-17 19:38:42 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2020-05-17 20:34:31 +0200 |
commit | 5d7500809b375c57bd2e85ff6692de4a39522bf7 (patch) | |
tree | cdd12e97a241d91aa5a291696862d2715d202eac /roles | |
parent | 2f3e75fe26fb123b365cba6aba94b096a12a51bf (diff) |
Nextcloud: Fix location{} directives.
For use with Nextcloud 18, cf. https://docs.nextcloud.com/server/18/admin_manual/installation/nginx.html#nextcloud-in-the-webroot-of-nginx .
Diffstat (limited to 'roles')
-rw-r--r-- | roles/nextcloud/files/etc/nginx/sites-available/nextcloud | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/nextcloud/files/etc/nginx/sites-available/nextcloud b/roles/nextcloud/files/etc/nginx/sites-available/nextcloud index d9dba5e..e971f99 100644 --- a/roles/nextcloud/files/etc/nginx/sites-available/nextcloud +++ b/roles/nextcloud/files/etc/nginx/sites-available/nextcloud @@ -49,60 +49,60 @@ server { fastcgi_buffers 64 4K; fastcgi_buffer_size 32k; # Enable gzip but do not remove ETag headers gzip on; gzip_vary on; gzip_comp_level 4; gzip_min_length 256; gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; error_page 403 /core/templates/403.php; error_page 404 /core/templates/404.php; location = / { return 303 $scheme://$host/apps/files/; } location / { rewrite ^ /index.php$uri last; } location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { internal; } location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { internal; } - location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) { + location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|oc[ms]-provider/.+|core/templates/40[34])\.php(?:$|/) { include snippets/fastcgi-php.conf; fastcgi_param modHeadersAvailable true; fastcgi_param front_controller_active true; fastcgi_intercept_errors on; fastcgi_request_buffering off; fastcgi_pass unix:/run/php/php7.3-fpm@nextcloud.sock; } - location ~ ^/(?:updater|ocs-provider)(?:$|/) { + location ~ ^/(?:updater|oc[ms]-provider)(?:$|/) { try_files $uri/ =404; index index.php; } - location ~* \.(?:css|js|woff|svg|gif)$ { + location ~ \.(?:css|js|woff2?|svg|gif|map)$ { try_files $uri /index.php$uri$is_args$args; expires 30d; } - location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ { + location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { try_files $uri /index.php$uri$is_args$args; } location = /core/img/favicon.ico { alias /var/www/nextcloud/fripost.ico; } } server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; server_name www.cloud.fripost.org; include /etc/lacme/nginx.conf; access_log /var/log/nginx/cloud.access.log; error_log /var/log/nginx/cloud.error.log info; |