From c324114b7a0f1d31ef089371f2e26692a922443c Mon Sep 17 00:00:00 2001 From: Tim Bracken Date: Tue, 16 Aug 2016 15:08:27 -0400 Subject: [PATCH] Add drupal 8 example to make laradock framework agnostic. --- nginx/sites/framework-examples/drupal_8.conf | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 nginx/sites/framework-examples/drupal_8.conf diff --git a/nginx/sites/framework-examples/drupal_8.conf b/nginx/sites/framework-examples/drupal_8.conf new file mode 100644 index 00000000..30ec9588 --- /dev/null +++ b/nginx/sites/framework-examples/drupal_8.conf @@ -0,0 +1,31 @@ +server { + listen 80; + listen [::]:80; + + server_name site_a.dev; + root /var/www/site_a; + index index.php; + + + location / { + try_files $uri $uri/ /index.php?q=$uri&$args; + } + + error_page 404 /404.html; + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /var/www/site_a; + } + + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass php-upstream; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } +} \ No newline at end of file