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