Просмотр исходного кода

Merge pull request #2009 from jaapmarcus/fix/2007-no-php-templates

Overwrite types ignores mine.types
Raphael Schneeberger 4 лет назад
Родитель
Сommit
907bc98598

+ 4 - 4
install/deb/templates/web/nginx/php-fpm/no-php.stpl

@@ -19,16 +19,16 @@ server {
 
     include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
-    types {
-            text/html   html htm shtml php php5;
-    }
-
     location / {
         location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
             expires     max;
             fastcgi_hide_header "Set-Cookie";
         }
     }
+    
+    location ~ [^/]\.php(/|$) {
+        types { } default_type "text/html";
+    }
 
     location /error/ {
         alias   %home%/%user%/web/%domain%/document_errors/;

+ 4 - 4
install/deb/templates/web/nginx/php-fpm/no-php.tpl

@@ -14,16 +14,16 @@ server {
         
     include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
-    types {
-            text/html   html htm shtml php php5;
-    }
-
     location / {
         location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
             expires     max;
             fastcgi_hide_header "Set-Cookie";
         }
     }
+    
+    location ~ [^/]\.php(/|$) {
+        types { } default_type "text/html";
+    }
 
     location /error/ {
         alias   %home%/%user%/web/%domain%/document_errors/;