From 9f4b5e7856c426ad1f9bf5f3878e3c8ff457ec2e Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 3 Apr 2020 05:45:24 +0200 Subject: [PATCH] Fix incorrect nginx configuration Signed-off-by: Manuel Thalmann --- .../insecure/mariadb-cron-redis/fpm/web/nginx.conf | 12 ++++++------ .../insecure/mariadb/fpm/web/nginx.conf | 12 ++++++------ .../insecure/postgres/fpm/web/nginx.conf | 12 ++++++------ .../mariadb-cron-redis/fpm/web/nginx.conf | 12 ++++++------ .../with-nginx-proxy/mariadb/fpm/web/nginx.conf | 12 ++++++------ .../with-nginx-proxy/postgres/fpm/web/nginx.conf | 12 ++++++------ 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.examples/docker-compose/insecure/mariadb-cron-redis/fpm/web/nginx.conf b/.examples/docker-compose/insecure/mariadb-cron-redis/fpm/web/nginx.conf index d44c059e..c694a6f4 100644 --- a/.examples/docker-compose/insecure/mariadb-cron-redis/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/mariadb-cron-redis/fpm/web/nginx.conf @@ -97,6 +97,12 @@ http { #pagespeed off; location / { + try_files $uri /index.php$request_uri @nextcloud-fallback; + # Optional: Don't log access to other assets + access_log off; + } + + location @nextcloud-fallback { rewrite ^ /index.php; } @@ -158,11 +164,5 @@ http { # Optional: Don't log access to assets access_log off; } - - location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { - try_files $uri /index.php$request_uri; - # Optional: Don't log access to other assets - access_log off; - } } } diff --git a/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf b/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf index d44c059e..c694a6f4 100644 --- a/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf @@ -97,6 +97,12 @@ http { #pagespeed off; location / { + try_files $uri /index.php$request_uri @nextcloud-fallback; + # Optional: Don't log access to other assets + access_log off; + } + + location @nextcloud-fallback { rewrite ^ /index.php; } @@ -158,11 +164,5 @@ http { # Optional: Don't log access to assets access_log off; } - - location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { - try_files $uri /index.php$request_uri; - # Optional: Don't log access to other assets - access_log off; - } } } diff --git a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf index d44c059e..c694a6f4 100644 --- a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf @@ -97,6 +97,12 @@ http { #pagespeed off; location / { + try_files $uri /index.php$request_uri @nextcloud-fallback; + # Optional: Don't log access to other assets + access_log off; + } + + location @nextcloud-fallback { rewrite ^ /index.php; } @@ -158,11 +164,5 @@ http { # Optional: Don't log access to assets access_log off; } - - location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { - try_files $uri /index.php$request_uri; - # Optional: Don't log access to other assets - access_log off; - } } } diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/fpm/web/nginx.conf b/.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/fpm/web/nginx.conf index 4d301636..b14f9101 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/fpm/web/nginx.conf +++ b/.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/fpm/web/nginx.conf @@ -102,6 +102,12 @@ http { #pagespeed off; location / { + try_files $uri /index.php$request_uri @nextcloud-fallback; + # Optional: Don't log access to other assets + access_log off; + } + + location @nextcloud-fallback { rewrite ^ /index.php; } @@ -163,11 +169,5 @@ http { # Optional: Don't log access to assets access_log off; } - - location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { - try_files $uri /index.php$request_uri; - # Optional: Don't log access to other assets - access_log off; - } } } diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf index 4d301636..b14f9101 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf @@ -102,6 +102,12 @@ http { #pagespeed off; location / { + try_files $uri /index.php$request_uri @nextcloud-fallback; + # Optional: Don't log access to other assets + access_log off; + } + + location @nextcloud-fallback { rewrite ^ /index.php; } @@ -163,11 +169,5 @@ http { # Optional: Don't log access to assets access_log off; } - - location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { - try_files $uri /index.php$request_uri; - # Optional: Don't log access to other assets - access_log off; - } } } diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf index 4d301636..b14f9101 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf +++ b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf @@ -102,6 +102,12 @@ http { #pagespeed off; location / { + try_files $uri /index.php$request_uri @nextcloud-fallback; + # Optional: Don't log access to other assets + access_log off; + } + + location @nextcloud-fallback { rewrite ^ /index.php; } @@ -163,11 +169,5 @@ http { # Optional: Don't log access to assets access_log off; } - - location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { - try_files $uri /index.php$request_uri; - # Optional: Don't log access to other assets - access_log off; - } } }