From d2d6b85d43a7b6afb96cf4d14de96638bae14908 Mon Sep 17 00:00:00 2001 From: Phinitnan Chanasabaeng Date: Tue, 7 Aug 2018 14:02:36 +0700 Subject: [PATCH] Fixed missing NGINX rewrite rule for Drupal 7 & 8 --- install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl | 4 ++++ install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl | 4 ++++ install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl | 4 ++++ install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl | 6 +++++- install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl | 4 ++++ install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl | 4 ++++ install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl | 4 ++++ install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl | 6 +++++- install/debian/9/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ install/debian/9/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ install/debian/9/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ install/debian/9/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- .../ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.stpl | 4 ++++ .../ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.tpl | 4 ++++ .../ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.stpl | 4 ++++ .../ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.tpl | 6 +++++- 76 files changed, 323 insertions(+), 19 deletions(-) diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/debian/9/templates/web/nginx/php-fpm/drupal7.stpl b/install/debian/9/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/debian/9/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/debian/9/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/debian/9/templates/web/nginx/php-fpm/drupal7.tpl b/install/debian/9/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/debian/9/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/debian/9/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/debian/9/templates/web/nginx/php-fpm/drupal8.stpl b/install/debian/9/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/debian/9/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/debian/9/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/debian/9/templates/web/nginx/php-fpm/drupal8.tpl b/install/debian/9/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/debian/9/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/debian/9/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; diff --git a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.stpl b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.stpl +++ b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.tpl b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.tpl index c9729795..14f0c833 100644 --- a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.tpl +++ b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal7.tpl @@ -44,6 +44,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.stpl b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.stpl index 030ea952..bdf97f65 100644 --- a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.stpl +++ b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.stpl @@ -48,6 +48,10 @@ server { return 404; } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } diff --git a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.tpl b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.tpl index c9729795..6d0e5bd6 100644 --- a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.tpl +++ b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal8.tpl @@ -42,7 +42,11 @@ server { location ~ /vendor/.*\.php$ { deny all; return 404; - } + } + + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite;