瀏覽代碼

Add drupal 8 example to make laradock framework agnostic.

Tim Bracken 8 年之前
父節點
當前提交
c324114b7a
共有 1 個文件被更改,包括 31 次插入0 次删除
  1. 31 0
      nginx/sites/framework-examples/drupal_8.conf

+ 31 - 0
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;
+    }
+}