diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl
+++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl
+++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 100644
--- a/install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl
+++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 100644
--- a/install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl
+++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 100644
--- a/install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl
+++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 100644
--- a/install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl
+++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl
+++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal6.tpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/debian/8/templates/web/nginx/php5-fpm/drupal6.tpl
+++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 100644
--- a/install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl
+++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 100644
--- a/install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl
+++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 100644
--- a/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl
+++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 100644
--- a/install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl
+++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/debian/9/templates/web/nginx/php-fpm/drupal6.stpl b/install/debian/9/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/debian/9/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/debian/9/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/debian/9/templates/web/nginx/php-fpm/drupal6.tpl b/install/debian/9/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/debian/9/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/debian/9/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 100644
--- a/install/debian/9/templates/web/nginx/php-fpm/drupal7.stpl
+++ b/install/debian/9/templates/web/nginx/php-fpm/drupal7.stpl
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 100644
--- a/install/debian/9/templates/web/nginx/php-fpm/drupal7.tpl
+++ b/install/debian/9/templates/web/nginx/php-fpm/drupal7.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 100644
--- a/install/debian/9/templates/web/nginx/php-fpm/drupal8.stpl
+++ b/install/debian/9/templates/web/nginx/php-fpm/drupal8.stpl
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 100644
--- a/install/debian/9/templates/web/nginx/php-fpm/drupal8.tpl
+++ b/install/debian/9/templates/web/nginx/php-fpm/drupal8.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal6.stpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/rhel/5/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal6.tpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/rhel/5/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 100644
--- a/install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl
+++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 100644
--- a/install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl
+++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 100644
--- a/install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl
+++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 100644
--- a/install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl
+++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal6.stpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/rhel/6/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal6.tpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/rhel/6/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 100644
--- a/install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl
+++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 100644
--- a/install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl
+++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 100644
--- a/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl
+++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 100644
--- a/install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl
+++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal6.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/rhel/7/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal6.tpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/rhel/7/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 100644
--- a/install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl
+++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 100644
--- a/install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl
+++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 100644
--- a/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl
+++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 100644
--- a/install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl
+++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/17.04/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/17.10/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal6.stpl b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal6.stpl
index 91a70936..0af7ce84 100644
--- a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal6.stpl
+++ b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal6.stpl
@@ -31,48 +31,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
diff --git a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal6.tpl b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal6.tpl
index ac32dcd9..d1096bff 100644
--- a/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal6.tpl
+++ b/install/ubuntu/18.04/templates/web/nginx/php-fpm/drupal6.tpl
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,48 +27,42 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
location / {
try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
}
location @rewrite {
- # For Drupal 6 and bwlow:
- # Some modules enforce no slash (/) at the end of the URL
- # Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
+
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
- location ~ ^/sites/.*/files/styles/ {
+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ ^/sites/.*/files/imagecache/ {
+ try_files $uri @rewrite;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
}
error_page 403 /error/404.html;
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 3b9dabf5..030ea952 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
@@ -31,50 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 1b979475..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,50 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 50d85b68..030ea952 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
@@ -31,51 +31,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
- }
-
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
+ }
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
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 71b538bf..c9729795 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
@@ -18,7 +18,6 @@ server {
access_log off;
}
- # Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
@@ -28,51 +27,44 @@ server {
return 403;
}
- # No no for private
location ~ ^/sites/.*/private/ {
return 403;
}
-
- # Block access to "hidden" files and directories whose names begin with a
- # period. This includes directories used by version control systems such
- # as Subversion or Git to store control files.
- location ~ (^|/)\. {
- return 403;
+
+ location ~ ^/sites/[^/]+/files/.*\.php$ {
+ deny all;
}
-
+
location / {
- try_files $uri @rewrite;
-
- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
- expires max;
- }
-
- location ~ [^/]\.php(/|$)|^/update.php {
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- fastcgi_pass %backend_lsnr%;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_intercept_errors on;
- include /etc/nginx/fastcgi_params;
- }
+ try_files $uri /index.php?$query_string;
}
- location @rewrite {
- # You have 2 options here
- # For D7 and above:
- # Clean URLs are handled in drupal_environment_initialize().
- rewrite ^ /index.php;
- }
+ location ~ /vendor/.*\.php$ {
+ deny all;
+ return 404;
+ }
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
+ location ~ ^(/[a-z\-]+)?/system/files/ {
+ try_files $uri /index.php?$query_string;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
+ try_files $uri @rewrite;
+ expires max;
+ log_not_found off;
+ }
+
+ location ~ '\.php$|^/update.php' {
+ fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_pass %backend_lsnr%;
+ include /etc/nginx/fastcgi_params;
+ }
+
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh
index ef4b7079..a17517e3 100755
--- a/install/vst-install-ubuntu.sh
+++ b/install/vst-install-ubuntu.sh
@@ -33,9 +33,9 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
# Fix for old releases
if [[ ${release:0:2} -lt 16 ]]; then
- software=$(echo "$software" |sed -e "s/php /php5 /")
- software=$(echo "$software" |sed -e "s/php-/php5-/")
- software=$(echo "$software" |sed -e "s/mod-php/mod-php5/")
+ software=$(echo "$software" |sed -e "s/php /php5 /g")
+ software=$(echo "$software" |sed -e "s/vesta-php5 /vesta-php /g")
+ software=$(echo "$software" |sed -e "s/php-/php5-/g")
fi
# Defining help function
diff --git a/web/inc/i18n/cn.php b/web/inc/i18n/cn.php
index 9d58b381..d47587db 100644
--- a/web/inc/i18n/cn.php
+++ b/web/inc/i18n/cn.php
@@ -98,7 +98,7 @@ $LANG['cn'] = array(
'list accounts' => '列出 %s 个账户',
'add account' => '添加账户',
'open webmail' => '打开网页邮箱',
- 'list fail2ban' => 'fail2ban 封锁名单',
+ 'list fail2ban' => 'Fail2ban 封锁名单',
'open %s' => '打开 %s',
'download' => '下载',
'restore' => '恢复',
@@ -136,7 +136,7 @@ $LANG['cn'] = array(
'Editing Package' => '编辑方案',
'Adding IP address' => '添加IP地址',
'Editing IP Address' => '编辑IP地址',
- 'Editing Backup Exclusions' => '配置备份排除项目',
+ 'Editing Backup Exclusions' => '配置排除的备份项目',
'Generating CSR' => '生成CSR',
'Listing' => '列出',
'Search Results' => '搜索结果',
@@ -175,7 +175,7 @@ $LANG['cn'] = array(
'User Directories' => '用户目录',
'Template' => '模板',
'Web Template' => 'Web模板',
- 'Backend Template' => 'Backend模板',
+ 'Backend Template' => '后端模板',
'Proxy Template' => '代理模板',
'DNS Template' => 'DNS模板',
'Web Domains' => '网站域名',
@@ -194,15 +194,15 @@ $LANG['cn'] = array(
'IP Addresses' => 'IP地址',
'Backups' => '备份',
'Backup System' => '备份系统',
- 'backup exclusions' => '备份排除项目',
+ 'backup exclusions' => '排除的备份项目',
'template' => '模板',
'SSL Support' => '启用SSL',
'SSL Home Directory' => 'SSL站点主目录',
'Lets Encrypt Support' => '采用 Let's Encrypt',
'Lets Encrypt' => 'Let's Encrypt',
- 'Your certificate will be automatically issued in 5 minutes' => '证书将在5分钟内自动签发完成',
+ 'Your certificate will be automatically issued in 5 minutes' => '证书将在5分钟内自动完成签发',
'Proxy Support' => '反向代理',
- 'Proxy Extensions' => '代理的文件扩展名',
+ 'Proxy Extensions' => '需代理的文件扩展名',
'Web Statistics' => '网站统计',
'Additional FTP Account' => '额外的FTP账户',
'Path' => '路径',
@@ -274,7 +274,7 @@ $LANG['cn'] = array(
'ftp server' => 'FTP服务',
'job scheduler' => '执行定时任务',
'firewall' => '防火墙服务',
- 'brute-force monitor' => '监控暴力破解',
+ 'brute-force monitor' => '防范暴力攻击',
'CPU' => 'CPU',
'Memory' => '内存',
'Uptime' => '已运行时间',
@@ -442,7 +442,7 @@ $LANG['cn'] = array(
'%s log records' => '%s 条日志记录',
'1 object' => '1 个对象',
'%s objects' => '%s 个对象',
- 'no exclusions' => '未排除',
+ 'no exclusions' => '没有被排除的项目',
'1 rule' => '1 条规则',
'%s rules' => '%s 条规则',
'There are no currently banned IP' => '目前没有被封锁的IP地址',
@@ -559,8 +559,8 @@ $LANG['cn'] = array(
'Default Language' => '默认语言',
'Proxy Server' => '代理服务器',
'Web Server' => 'Web 服务器',
- 'Backend Server' => 'Backend 服务器',
- 'Backend Pool Mode' => 'Backend Pool 模式',
+ 'Backend Server' => '后端服务器',
+ 'Backend Pool Mode' => '后端池模式',
'DNS Server' => 'DNS 服务器',
'DNS Cluster' => 'DNS 集群',
'MAIL Server' => '邮箱服务器',
@@ -595,7 +595,7 @@ $LANG['cn'] = array(
'Starred' => '星标',
'Name' => '名称',
- 'save to favorites' => '收藏加星',
+ 'save to favorites' => '添加星标',
'File Manager' => '文件管理',
'size' => '大小',
@@ -635,8 +635,8 @@ $LANG['cn'] = array(
'Create' => '创建',
'Compress' => '压缩',
'OK' => '确定',
- 'YOU ARE COPYING' => 'YOU ARE COPYING',
- 'YOU ARE REMOVING' => 'YOU ARE REMOVING',
+ 'YOU ARE COPYING' => '你正在复制',
+ 'YOU ARE REMOVING' => '你正在移除',
'Delete items' => '删除这些项目',
'Copy files' => '复制这些文件',
'Move files' => '移动这些文件',
@@ -746,7 +746,7 @@ $LANG['cn'] = array(
'SUBJECT' => '颁发给',
'ALIASES' => '可选名称',
'NOT_BEFORE' => '有效期从',
- 'NOT_AFTER' => '有效期到',
+ 'NOT_AFTER' => '有效期至',
'SIGNATURE' => '签名算法',
'PUB_KEY' => '密钥位数',
'ISSUER' => '颁发者',
diff --git a/web/inc/i18n/th.php b/web/inc/i18n/th.php
index 96f23bb5..07beb85e 100644
--- a/web/inc/i18n/th.php
+++ b/web/inc/i18n/th.php
@@ -3,6 +3,7 @@
* Vesta language file
* Language: Thai ( Thailand )
* thatphon05@gmail.com
+ * phinitnan_c@xtony.us
*/
$LANG['th'] = array(
@@ -11,10 +12,10 @@ $LANG['th'] = array(
'IP' => 'IP',
'Graphs' => 'กราฟ',
'Statistics' => 'สถิติ',
- 'Log' => 'Log',
- 'Server' => 'เซิฟเวอร์',
+ 'Log' => 'บันทึกเหตุการณ์',
+ 'Server' => 'เซิร์ฟเวอร์',
'Services' => 'บริการ',
- 'Firewall' => 'ไฟร์วอลล์',
+ 'Firewall' => 'Firewall',
'Updates' => 'อัพเดท',
'Log in' => 'เข้าสู่ระบบ',
'Log out' => 'ออกจากระบบ',
@@ -22,47 +23,47 @@ $LANG['th'] = array(
'USER' => 'ผู้ใช้',
'WEB' => 'เว็บ',
'DNS' => 'DNS',
- 'MAIL' => 'เมล์',
+ 'MAIL' => 'เมล',
'DB' => 'ฐานข้อมูล',
'CRON' => 'CRON',
'BACKUP' => 'สำรองข้อมูล',
'LOGIN' => 'เข้าสู่ระบบ',
- 'RESET PASSWORD' => 'รีเซ็ตรหัสผ่าน',
+ 'RESET PASSWORD' => 'ตั้งรหัสผ่านใหม่',
'SEARCH' => 'ค้นหา',
'PACKAGE' => 'แพ็กเกจ',
'RRD' => 'RRD',
- 'STATS' => 'STATS',
- 'LOG' => 'ล็อก',
+ 'STATS' => 'สถิติ',
+ 'LOG' => 'บันทึกเหตุการณ์',
'UPDATES' => 'อัพเดท',
- 'FIREWALL' => 'ไฟร์วอลล์',
- 'SERVER' => 'เซิฟเวอร์',
+ 'FIREWALL' => 'FIREWALL',
+ 'SERVER' => 'เซิร์ฟเวอร์',
'MEMORY' => 'หน่วยความจำ',
- 'DISK' => 'พื้นที่จัดเก็บข้อมูล',
+ 'DISK' => 'พื้นที่เก็บข้อมูล',
'NETWORK' => 'เครือข่าย',
- 'Web Log Manager' => 'ตัวจัดการ Web Log',
+ 'Web Log Manager' => 'ตัวจัดการบันทึกเหตุการณ์เว็บ',
'no notifications' => 'ไม่มีการแจ้งเตือน',
'Add User' => 'เพิ่มผู้ใช้',
'Add Domain' => 'เพิ่มโดเมน',
- 'Add Web Domain' => 'เพิ่ม Web Domain',
- 'Add DNS Domain' => 'เพิ่ม DNS Domain',
- 'Add DNS Record' => 'เพิ่ม DNS Record',
- 'Add Mail Domain' => 'เพิ่ม Mail Domain',
- 'Add Mail Account' => 'เพิ่มบัญชีเมล์',
+ 'Add Web Domain' => 'เพิ่มโดเมนสำหรับเว็บ',
+ 'Add DNS Domain' => 'เพิ่มโดเมนสำหรับ DNS',
+ 'Add DNS Record' => 'เพิ่มรายการ DNS',
+ 'Add Mail Domain' => 'เพิ่มโดเมนสำหรับเมล',
+ 'Add Mail Account' => 'เพิ่มบัญชีเมล',
'Add Database' => 'เพิ่มฐานข้อมูล',
- 'Add Cron Job' => 'เพิ่ม Cron Job',
- 'Create Backup' => 'สร้างการสำรองข้อมูล',
- 'Configure' => 'ปรับแต่ง',
+ 'Add Cron Job' => 'เพิ่มงาน CRON',
+ 'Create Backup' => 'สร้างข้อมูลสำรอง',
+ 'Configure' => 'ตั้งค่า',
'Restore All' => 'คืนค่าทั้งหมด',
'Add Package' => 'เพิ่มแพ็กเกจ',
- 'Add IP' => 'เพิ่ม IP Address',
- 'Add Rule' => 'เพิ่ม Rule',
- 'Ban IP Address' => 'แบน IP Address',
+ 'Add IP' => 'เพิ่ม IP',
+ 'Add Rule' => 'เพิ่มกฎ',
+ 'Ban IP Address' => 'แบนหมายเลข IP',
'Search' => 'ค้นหา',
- 'Add one more FTP Account' => 'เพิ่มอีกบัญชี',
- 'Overall Statistics' => 'สถิติโดยรวม',
+ 'Add one more FTP Account' => 'เพิ่ม FTP อีกหนึ่งบัญชี',
+ 'Overall Statistics' => 'สถิติภาพรวม',
'Daily' => 'รายวัน',
'Weekly' => 'รายสัปดาห์',
'Monthly' => 'รายเดือน',
@@ -73,28 +74,28 @@ $LANG['th'] = array(
'Submit' => 'ส่งข้อมูล',
'toggle all' => 'เลือกทั้งหมด',
- 'apply to selected' => 'นำไปใช้กับที่เลือก',
- 'rebuild' => 'สร้างใหม่',
- 'rebuild web' => 'สร้างเว็บใหม่',
- 'rebuild dns' => 'สร้าง DNS ใหม่',
- 'rebuild mail' => 'สร้างเมล์ใหม่',
- 'rebuild db' => 'สร้างฐานข้อมูลใหม่',
- 'rebuild cron' => 'สร้าง Cron ใหม่',
+ 'apply to selected' => 'นำไปใช้กับรายการที่เลือก',
+ 'rebuild' => 'ใช้การตั้งค่าล่าสุด',
+ 'rebuild web' => 'ใช้การตั้งค่าเว็บล่าสุด',
+ 'rebuild dns' => 'ใช้การตั้งค่า DNS ล่าสุด',
+ 'rebuild mail' => 'ใช้การตั้งค่าเมลล่าสุด',
+ 'rebuild db' => 'ใช้การตั้งค่าฐานข้อมูลล่าสุด',
+ 'rebuild cron' => 'ใช้การตั้งค่า CRON ล่าสุด',
'update counters' => 'อัพเดทตัวนับ',
'suspend' => 'ระงับการใช้งาน',
- 'unsuspend' => 'เปิดใช้งาน',
+ 'unsuspend' => 'ยกเลิกระงับการใช้งาน',
'delete' => 'ลบ',
- 'show per user' => 'แสดงต่อผู้ใช้',
- 'login as' => 'เข้าสู่ระบบด้วย',
+ 'show per user' => 'แสดงผลต่อผู้ใช้',
+ 'login as' => 'เข้าสู่ระบบในนาม',
'logout' => 'ออกจากระบบ',
'edit' => 'แก้ไข',
'open webstats' => 'เปิดสถิติเว็บ',
- 'view logs' => 'ดู Logs',
- 'list records' => 'รายการ %s records',
- 'add record' => 'เพิ่ม Record',
- 'list accounts' => 'รายการ %s บัญชี',
+ 'view logs' => 'ดูบันทึกเหตุการณ์',
+ 'list records' => 'แสดงรายการ',
+ 'add record' => 'เพิ่มรายการ',
+ 'list accounts' => 'แสดงบัญชี',
'add account' => 'เพิ่มบัญชี',
- 'open webmail' => 'เปิด Webmail',
+ 'open webmail' => 'เปิดเว็บเมล',
'list fail2ban' => 'รายการ fail2ban',
'open %s' => 'เปิด %s',
'download' => 'ดาวน์โหลด',
@@ -106,48 +107,48 @@ $LANG['th'] = array(
'update' => 'อัพเดท',
'generate' => 'สร้าง',
'Generate CSR' => 'สร้าง CSR',
- 'reread IP' => 'อ่าน IP ใหม่',
+ 'reread IP' => 'อ่าน IP ซ้ำ',
'enable autoupdate' => 'เปิดการอัพเดทอัตโนมัติ',
'disable autoupdate' => 'ปิดการอัพเดทอัตโนมัติ',
- 'turn on notifications' => 'เปิดใช้งานการแจ้งเตือน',
- 'turn off notifications' => 'ปิดใช้งานการแจ้งเตือน',
+ 'turn on notifications' => 'เปิดการแจ้งเตือน',
+ 'turn off notifications' => 'ปิดการแจ้งเตือน',
'configure' => 'ปรับแต่ง',
'Adding User' => 'เพิ่มผู้ใช้',
'Editing User' => 'แก้ไขผู้ใช้',
'Adding Domain' => 'เพิ่มโดเมน',
'Editing Domain' => 'แก้ไขโดเมน',
- 'Adding DNS Domain' => 'เพิ่ม DNS Domain',
- 'Editing DNS Domain' => 'แก้ไข DNS Domain',
- 'Adding DNS Record' => 'เพิ่ม DNS Record',
- 'Editing DNS Record' => 'แก้ไข DNS Record',
- 'Adding Mail Domain' => 'เพิ่ม Mail Domain',
- 'Editing Mail Domain' => 'แก้ไข Mail Domain',
- 'Adding Mail Account' => 'เพิ่มบัญชีเมล์',
- 'Editing Mail Account' => 'แก้ไขบัญชีเมล์',
+ 'Adding DNS Domain' => 'เพิ่ม DNS สำหรับโดเมน',
+ 'Editing DNS Domain' => 'แก้ไข DNS สำหรับโดเมน',
+ 'Adding DNS Record' => 'เพิ่มรายการ DNS',
+ 'Editing DNS Record' => 'แก้ไขรายการ DNS',
+ 'Adding Mail Domain' => 'เพิ่มโดเมนสำหรับเมล',
+ 'Editing Mail Domain' => 'แก้ไขโดเมนสำหรับเมล',
+ 'Adding Mail Account' => 'เพิ่มบัญชีเมล',
+ 'Editing Mail Account' => 'แก้ไขบัญชีเมล',
'Adding database' => 'เพิ่มฐานข้อมูล',
- 'Editing Cron Job' => 'แก้ไข Cron Job',
- 'Adding Cron Job' => 'เพิ่ม Cron Job',
+ 'Editing Cron Job' => 'แก้ไขงาน CRON',
+ 'Adding Cron Job' => 'เพิ่มงาน CRON',
'Editing Database' => 'แก้ไขฐานข้อมูล',
'Adding Package' => 'เพิ่มแพ็กเกจ',
'Editing Package' => 'แก้ไขแพ็กเกจ',
- 'Adding IP address' => 'เพิ่ม IP address',
- 'Editing IP Address' => 'แก้ไข IP Address',
+ 'Adding IP address' => 'เพิ่มที่อยู่ IP',
+ 'Editing IP Address' => 'แก้ไขที่อยู่ IP',
'Editing Backup Exclusions' => 'แก้ไขการยกเว้นสำรองข้อมูล',
'Generating CSR' => 'สร้าง CSR',
'Listing' => 'รายการ',
- 'Search Results' => 'ผลลัพธ์ของการค้นหา',
- 'Adding Firewall Rule' => 'การเพิ่ม Firewall Rule',
- 'Editing Firewall Rule' => 'การแก้ไข Firewall Rule',
- 'Adding IP Address to Banlist' => 'การแบน IP Address',
+ 'Search Results' => 'ผลลัพธ์การค้นหา',
+ 'Adding Firewall Rule' => 'การเพิ่มกฎ Firewall',
+ 'Editing Firewall Rule' => 'การแก้ไขกฎ Firewall',
+ 'Adding IP Address to Banlist' => 'เพิ่มที่อยู่ IP ในรายการแบน',
'active' => 'เปิดใช้งาน',
'spnd' => 'ระงับการใช้งาน',
'suspended' => 'ระงับการใช้งานแล้ว',
'running' => 'กำลังทำงาน',
'stopped' => 'หยุดทำงานแล้ว',
- 'outdated' => 'ตกรุ่น',
- 'updated' => 'อัพเดท',
+ 'outdated' => 'ตกรุ่นแล้ว',
+ 'updated' => 'อัพเดทแล้ว',
'yes' => 'ใช่',
'no' => 'ไม่ใช่',
@@ -164,37 +165,37 @@ $LANG['th'] = array(
'minutes' => 'นาที',
'month' => 'เดือน',
'package' => 'แพ็กเกจ',
- 'Bandwidth' => 'แบนด์วิดธ์',
+ 'Bandwidth' => 'ปริมาณรับส่งข้อมูล',
'Disk' => 'พื้นที่จัดเก็บข้อมูล',
'Web' => 'เว็บ',
- 'Mail' => 'เมล์',
+ 'Mail' => 'เมล',
'Databases' => 'ฐานข้อมูล',
'User Directories' => 'ไดเร็กทอรี่ของผู้ใช้',
- 'Template' => 'Template',
- 'Web Template' => 'Web Template',
- 'Backend Template' => 'Backend Template',
- 'Proxy Template' =>'Proxy Template',
- 'DNS Template' => 'DNS Template',
- 'Web Domains' => 'Web Domains',
- 'SSL Domains' => 'SSL Domains',
- 'Web Aliases' => 'Web Aliases',
- 'per domain' => 'ต่อ Domain',
- 'DNS Domains' => 'DNS Domains',
- 'DNS domains' => 'DNS domains',
- 'DNS records' => 'DNS records',
+ 'Template' => 'ตัวแบบ',
+ 'Web Template' => 'ตัวแบบเว็บ',
+ 'Backend Template' => 'ตัวเแบบ Backend',
+ 'Proxy Template' =>'ตัวแบบ Proxy',
+ 'DNS Template' => 'ตัวแบบ DNS',
+ 'Web Domains' => 'โดเมนสำหรับเว็บ',
+ 'SSL Domains' => 'โดเมนสำหรับ SSL',
+ 'Web Aliases' => 'ชื่อแทนเว็บ',
+ 'per domain' => 'ต่อโดเมน',
+ 'DNS Domains' => 'โดเมนสำหรับ DNS',
+ 'DNS domains' => 'โดเมนสำหรับ DNS',
+ 'DNS records' => 'รายการ DNS',
'Name Servers' => 'Name Servers',
- 'Mail Domains' => 'Mail Domains',
- 'Mail Accounts' => 'บัญชีเมล์',
- 'Cron Jobs' => 'Cron Jobs',
- 'SSH Access' => 'การเข้าถึง SSH',
- 'IP Address' => 'IP Address',
- 'IP Addresses' => 'IP Addresses',
+ 'Mail Domains' => 'โดเมนสำหรับเมล',
+ 'Mail Accounts' => 'บัญชีเมล',
+ 'Cron Jobs' => 'งาน CRON',
+ 'SSH Access' => 'การเข้าใช้ SSH',
+ 'IP Address' => 'ที่อยู่ IP',
+ 'IP Addresses' => 'ที่อยู่ IP',
'Backups' => 'สำรองข้อมูล',
'Backup System' => 'ระบบสำรองข้อมูล',
'backup exclusions' => 'ยกเว้นการสำรองข้อมูล',
- 'template' => 'template',
+ 'template' => 'ตัวแบบ',
'SSL Support' => 'สนับสนุน SSL',
- 'SSL Home Directory' => 'หน้าแรกของ SSL',
+ 'SSL Home Directory' => 'ไดเร็กทอรี่หลักของ SSL',
'Lets Encrypt Support' => 'สนับสนุน Lets Encrypt',
'Lets Encrypt' => 'Lets Encrypt',
'Your certificate will be automatically issued in 5 minutes' => 'ใบรับรองของคุณจะได้รับการออกโดยอัตโนมัติภายใน 5 นาที',
@@ -206,17 +207,17 @@ $LANG['th'] = array(
'SOA' => 'SOA',
'TTL' => 'TTL',
'Expire' => 'หมดอายุ',
- 'Records' => 'Records',
+ 'Records' => 'รายการ',
'Serial' => 'Serial',
- 'Catchall email' => 'Catchall email',
- 'AntiVirus Support' => 'สนับสนุน AntiVirus',
- 'AntiSpam Support' => 'สนับสนุน AntiSpam',
+ 'Catchall email' => 'อีเมล Catchall',
+ 'AntiVirus Support' => 'สนับสนุนการป้องกันไวรัส',
+ 'AntiSpam Support' => 'สนับสนุนการป้องกันเมลขยะ',
'DKIM Support' => 'สนับสนุน DKIM',
'Accounts' => 'บัญชี',
'Quota' => 'โควตา',
'Autoreply' => 'ตอบกลับอัตโนมัติ',
'Forward to' => 'ส่งต่อไปยัง',
- 'Do not store forwarded mail' => 'อย่าเก็บเมล์ที่ส่งต่อไว้',
+ 'Do not store forwarded mail' => 'ไม่เก็บเมลที่ส่งต่อแล้วไว้',
'IMAP hostname' => 'IMAP hostname',
'IMAP port' => 'IMAP port',
'IMAP security' => 'IMAP security',
@@ -240,7 +241,7 @@ $LANG['th'] = array(
'Run Time' => 'เวลาทำงาน',
'Backup Size' => 'ขนาดสำรองข้อมูล',
'SYS' => 'SYS',
- 'Domains' => 'Domains',
+ 'Domains' => 'โดเมน',
'Status' => 'สถานะ',
'shared' => 'shared',
'dedicated' => 'dedicated',
@@ -253,72 +254,72 @@ $LANG['th'] = array(
'NGINX Usage' => 'การใช้ NGINX',
'MySQL Usage on localhost' => 'การใช้ MySQL บน localhost',
'PostgreSQL Usage on localhost' => 'การใช้ PostgreSQL บน localhost',
- 'Bandwidth Usage eth0' => 'การใช้ แบนด์วิดธ์ ของ eth0',
- 'Bandwidth Usage eth1' => 'การใช้ แบนด์วิดธ์ ของ eth1',
+ 'Bandwidth Usage eth0' => 'ขนาดการรับส่งข้อมูลของ eth0',
+ 'Bandwidth Usage eth1' => 'ขนาดการรับส่งข้อมูลของ eth1',
'Exim Usage' => 'การใช้ Exim',
'FTP Usage' => 'การใช้ FTP',
'SSH Usage' => 'การใช้ SSH',
'reverse proxy' => 'reverse proxy',
- 'web server' => 'web server',
- 'dns server' => 'dns server',
- 'mail server' => 'mail server',
- 'pop/imap server' => 'pop/imap server',
- 'email antivirus' => 'email antivirus',
- 'email antispam' => 'email antispam',
- 'database server' => 'database server',
- 'ftp server' => 'ftp server',
+ 'web server' => 'เซิร์ฟเวอร์เว็บ',
+ 'dns server' => 'เซิร์ฟเวอร์ dns',
+ 'mail server' => 'เซิร์ฟเวอร์เมล',
+ 'pop/imap server' => 'เซิร์ฟเวอร์ pop/imap',
+ 'email antivirus' => 'การป้องกันไวรัสอีเมล',
+ 'email antispam' => 'การป้องกันอีเมลขยะ',
+ 'database server' => 'เซิร์ฟเวอร์ฐานข้อมูล',
+ 'ftp server' => 'เซิร์ฟเวอร์ ftp',
'job scheduler' => 'job scheduler',
'firewall' => 'firewall',
- 'brute-force monitor' => 'ตรวจสอบการ brute-force',
+ 'brute-force monitor' => 'ดักจับ brute-force',
'CPU' => 'CPU',
'Memory' => 'หน่วยความจำ',
- 'Uptime' => 'เวลาทำงาน',
+ 'Uptime' => 'ระบบทำงานมาแล้ว',
'core package' => 'แพ็กเกจหลัก',
- 'php interpreter' => 'ตัวแปลคำสั่ง php',
+ 'php interpreter' => 'ตัวแปลภาษา php',
'internal web server' => 'เว็บเซิร์ฟเวอร์ภายใน',
'Version' => 'เวอร์ชั่น',
- 'Release' => 'เวอร์ชั่นการปล่อย',
+ 'Release' => 'ลำดับที่',
'Architecture' => 'สถาปัตยกรรม',
'Object' => 'วัตถุ',
'Username' => 'ชื่อผู้ใช้',
'Password' => 'รหัสผ่าน',
- 'Email' => 'อีเมล์',
+ 'Email' => 'อีเมล',
'Package' => 'แพ็กเกจ',
'Language' => 'ภาษา',
'First Name' => 'ชื่อ',
'Last Name' => 'นามสกุล',
'Send login credentials to email address' => 'ชื่ออีเมล์สำหรับส่งข้อมูลการเข้าสู่ระบบ',
- 'Default Template' => 'Template มาตรฐาน',
- 'Default Name Servers' => 'Name Servers มาตรฐาน',
+ 'Default Template' => 'ตัวแบบเริ่มต้น',
+ 'Default Name Servers' => 'Name Servers เริ่มต้น',
'Domain' => 'โดเมน',
'DNS Support' => 'สนับสนุน DNS',
- 'Mail Support' => 'สนับสนุนเมล์',
+ 'Mail Support' => 'สนับสนุนเมล',
'Advanced options' => 'ตัวเลือกขั้นสูง',
'Basic options' => 'ตัวเลือกพื้นฐาน',
- 'Aliases' => 'Aliases',
+ 'Aliases' => 'ชื่อแทน',
'SSL Certificate' => 'SSL Certificate',
'SSL Key' => 'SSL Key',
'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate',
'SSL CSR' => 'SSL CSR',
'optional' => 'ทางเลือกเพิ่มเติม',
'internal' => 'ภายใน',
- 'Statistics Authorization' => 'การตรวจสอบสถิติ',
- 'Statistics Auth' => 'รับรองความถูกต้องของสถิติ',
+ 'Statistics Authorization' => 'กำหนดสิทธิการเข้าดูสถิติ',
+ 'Statistics Auth' => 'ลงทะเบียนเข้าดูสถิติ',
'Account' => 'บัญชี',
- 'Prefix will be automaticaly added to username' => 'คำนำหน้า %s จะถูกเพิ่มลงในชื่อผู้ใช้โดยอัตโนมัติ',
- 'Send FTP credentials to email' => 'ชื่ออีเมล์สำหรับส่งข้อมูล FTP',
+ 'Prefix will be automaticaly added to username' => 'จะมีการใส่คำนำหน้าลงในชื่อผู้ใช้โดยอัตโนมัติ',
+ 'Send FTP credentials to email' => 'ชื่ออีเมล์สำหรับส่งรหัสผ่าน FTP',
'Expiration Date' => 'วันหมดอายุ',
'YYYY-MM-DD' => 'ปี-เดือน-วัน',
'Name servers' => 'Name servers',
- 'Record' => 'Record',
+ 'Record' => 'รายการ',
'IP or Value' => 'IP หรือ ค่า',
'Priority' => 'ลำดับความสำคัญ',
- 'Record Number' => 'ตัวเลข record',
+ 'Record Number' => 'หมายเลขรายการ',
'in megabytes' => 'หน่วย megabytes',
'Message' => 'ข้อความ',
'use local-part' => 'ใช้ส่วนภายใน',
'one or more email addresses' => 'อย่างน้อย 1 ที่อยู่อีเมล์',
- 'Prefix will be automaticaly added to database name and database user' => 'คำนำหน้า %s จะถูกเพิ่มชื่อในฐานข้อมูลและฐานข้อมูลผู้ใช้โดยอัตโนมัติ',
+ 'Prefix will be automaticaly added to database name and database user' => 'จะมีการเพิ่มคำนำหน้าชื่อฐานข้อมูลและชื่อผู้ใช้ฐานข้อมูลโดยอัตโนมัติ',
'Database' => 'ฐานข้อมูล',
'Type' => 'ชนิด',
'Minute' => 'นาที',
@@ -327,35 +328,35 @@ $LANG['th'] = array(
'Netmask' => 'Netmask',
'Interface' => 'Interface',
'Shared' => 'แชร์',
- 'Assigned user' => 'กำหนดผู้ใช้แล้ว',
- 'Assigned domain' => 'โดเมนที่กำหนด',
+ 'Assigned user' => 'ผู้ใช้ที่กำหนดไว้',
+ 'Assigned domain' => 'โดเมนที่กำหนดไว้',
'NAT IP association' => 'NAT IP association',
'shell' => 'shell',
- 'web domains' => 'web domains',
- 'web aliases' => 'web aliases',
- 'dns records' => 'dns records',
- 'mail domains' => 'mail domains',
- 'mail accounts' => 'บัญชีเมล์',
+ 'web domains' => 'โดเมนสำหรับเว็บ',
+ 'web aliases' => 'ชื่อแทนเว็บ',
+ 'dns records' => 'รายการ dns',
+ 'mail domains' => 'โดเมนสำหรับเมล',
+ 'mail accounts' => 'บัญชีเมล',
'accounts' => 'บัญชี',
'databases' => 'ฐานข้อมูล',
- 'cron jobs' => 'cron jobs',
+ 'cron jobs' => 'งาน cron',
'backups' => 'สำรองข้อมูล',
'quota' => 'โควต้า',
- 'day of week' => 'วันในสัปดาห์',
- 'cmd' => 'cmd',
+ 'day of week' => 'วันของสัปดาห์',
+ 'cmd' => 'คำสั่ง',
'users' => 'ผู้ใช้',
'domains' => 'โดนเมน',
- 'aliases' => 'aliases',
- 'records' => 'records',
- 'jobs' => 'jobs',
+ 'aliases' => 'ชื่อแทน',
+ 'records' => 'รายการ',
+ 'jobs' => 'งาน',
'username' => 'ชื่อผู้ใช้',
'password' => 'รหัสผ่าน',
'type' => 'ชนิด',
'charset' => 'charset',
'domain' => 'โดเมน',
'ip' => 'ip',
- 'ip address' => 'ip address',
- 'IP address' => 'IP address',
+ 'ip address' => 'ที่อยู่ ip',
+ 'IP address' => 'ที่อยู่ IP',
'netmask' => 'netmask',
'interface' => 'interface',
'assigned user' => 'กำหนดผู้ใช้แล้ว',
@@ -368,11 +369,11 @@ $LANG['th'] = array(
'account' => 'บัญชี',
'ssl certificate' => 'ssl certificate',
'ssl key' => 'ssl key',
- 'stats user password' => 'stats user password',
- 'stats username' => 'stats username',
- 'stats password' => 'stats password',
- 'ftp user password' => 'FTP ชื่อผู้ใช้ รหัสผ่าน',
- 'ftp user' => 'ผู้ใช้ FTP',
+ 'stats user password' => 'รหัสผ่านของผู้ใช้สถิติ',
+ 'stats username' => 'ชื่อผู้ใช้สถิติ',
+ 'stats password' => 'รหัสผ่านสถิติ',
+ 'ftp user password' => 'รหัสผ่านของผู้ใช้สำหรับ ftp',
+ 'ftp user' => 'ผู้ใช้ ftp',
'Last 70 lines of %s.%s.log' => '70 บรรทัดสุดท้ายของ %s.%s.log',
'AccessLog' => 'AccessLog',
'ErrorLog' => 'ErrorLog',
@@ -383,13 +384,13 @@ $LANG['th'] = array(
'State / Province' => 'ถนน / แขวง',
'City / Locality' => 'เมือง / ท้องถิ่น',
'Organization' => 'องค์กร',
- 'Action' => 'การกระทำ',
+ 'Action' => 'ดำเนินการ',
'Protocol' => 'โปรโตคอล',
'Port' => 'Port',
'Comment' => 'หมายเหตุ',
'Banlist' => 'รายชื่อที่โดนแบน',
'ranges are acceptable' => 'ช่วงที่ยอมรับได้',
- 'CIDR format is supported' => 'การสนับสนุน CIDR',
+ 'CIDR format is supported' => 'สนับสนุนรูปแบบ CIDR',
'ACCEPT' => 'ยอมรับ',
'DROP' => 'บล็อค',
'TCP' => 'TCP',
@@ -400,12 +401,12 @@ $LANG['th'] = array(
'VESTA' => 'VESTA',
'Add one more Name Server' => 'เพิ่ม Name Server อีก',
- 'web domain' => 'web domain',
- 'dns domain' => 'dns domain',
- 'dns record' => 'dns record',
- 'mail domain' => 'mail domain',
+ 'web domain' => 'โดเมนสำหรับเว็บ',
+ 'dns domain' => 'โดเมนสำหรบ dns',
+ 'dns record' => 'รายการ dns',
+ 'mail domain' => 'โดเมนสำหรับเมล',
'mail account' => 'บัญชีเมล์',
- 'cron job' => 'cron job',
+ 'cron job' => 'งาน cron',
'cron' => 'cron',
'user dir' => 'ไดเร็กทอรี่ของผู้ใช้',
@@ -415,91 +416,91 @@ $LANG['th'] = array(
'%s accounts' => '%s บัญชี',
'1 domain' => '1 โดเมน',
'%s domains' => '%s โดเมน',
- '1 record' => '1 record',
- '%s records' => '%s records',
- '1 mail account' => '1 บัญชีเมล์',
- '%s mail accounts' => '%s บัญชีเมล์',
+ '1 record' => '1 รายการ',
+ '%s records' => '%s รายการ',
+ '1 mail account' => '1 บัญชีเมล',
+ '%s mail accounts' => '%s บัญชีเมล',
'1 database' => '1 ฐานข้อมูล',
'%s databases' => '%s ฐานข้อมูล',
- '1 cron job' => '1 cron job',
- '%s cron jobs' => '%s cron jobs',
- '1 archive' => '1 เก็บถาวร',
- '%s archives' => '%s เก็บถาวร',
+ '1 cron job' => '1 งาน cron',
+ '%s cron jobs' => '%s งาน cron',
+ '1 archive' => '1 ข้อมูลสำรอง',
+ '%s archives' => '%s ข้อมูลสำรอง',
'1 item' => '1 รายการ',
'%s items' => '%s รายการ',
'1 package' => '1 แพ็กเกจ',
- '%s packages' => '%s packages',
- '1 IP address' => '1 IP address',
- '%s IP addresses' => '%s IP addresses',
+ '%s packages' => '%s แพ็กเกจ',
+ '1 IP address' => '1 ที่อยู่ IP',
+ '%s IP addresses' => '%s ที่อยู่ IP',
'1 month' => '1 เดือน',
'%s months' => '%s เดือน',
- '1 log record' => '1 log record',
- '%s log records' => '%s log record',
+ '1 log record' => '1 บันทึกเหตุการณ์',
+ '%s log records' => '%s บันทึกเหตุการณ์',
'1 object' => '1 วัตถุ',
'%s objects' => '%s วัตถุ',
'no exclusions' => 'ไม่มีการยกเว้น',
- '1 rule' => '1 rule',
- '%s rules' => '%s rules',
+ '1 rule' => '1 กฎ',
+ '%s rules' => '%s กฎ',
'There are no currently banned IP' => 'ไม่มี IP ที่ถูกแบน',
- 'USER_CREATED_OK' => 'สร้างผู้ใช้ %s สำเร็จแล้ว',
- 'WEB_DOMAIN_CREATED_OK' => 'สร้างโดนเมน %s สำเร็จแล้ว',
- 'DNS_DOMAIN_CREATED_OK' => 'สร้าง DNS domain %s สำเร็จแล้ว',
- 'DNS_RECORD_CREATED_OK' => 'สร้าง Record %s.%s ได้ถูกสร้างสำเร็จแล้ว',
- 'MAIL_DOMAIN_CREATED_OK' => 'สร้าง Mail domain %s สำเร็จแล้ว',
- 'MAIL_ACCOUNT_CREATED_OK' => 'สร้างบัญชีเมล์ %s@%s สำเร็จแล้ว',
- 'DATABASE_CREATED_OK' => 'สร้างฐานข้อมูล %s สำเร็จแล้ว',
- 'CRON_CREATED_OK' => 'สร้าง Cron job ได้ถูกสร้างแล้ว',
- 'IP_CREATED_OK' => 'สร้าง IP address %s สำเร็จแล้ว',
- 'PACKAGE_CREATED_OK' => 'สร้างแพ็กเกจ %s สำเร็จแล้ว',
- 'SSL_GENERATED_OK' => 'สร้างใบรับรองสำเร็จแล้ว',
- 'RULE_CREATED_OK' => 'สร้าง Rule สำเร็จแล้ว',
- 'BANLIST_CREATED_OK' => 'สร้าง IP address สำเร็จแล้ว',
+ 'USER_CREATED_OK' => 'สร้างผู้ใช้ %s แล้ว',
+ 'WEB_DOMAIN_CREATED_OK' => 'สร้างโดเมน %s แล้ว',
+ 'DNS_DOMAIN_CREATED_OK' => 'สร้างโดเมนสำหรับ DNS %s แล้ว',
+ 'DNS_RECORD_CREATED_OK' => 'สร้างรายการ %s.%s แล้ว',
+ 'MAIL_DOMAIN_CREATED_OK' => 'สร้างโดเมนสำหรับเมล %s แล้ว',
+ 'MAIL_ACCOUNT_CREATED_OK' => 'สร้างบัญชีเมล %s@%s แล้ว',
+ 'DATABASE_CREATED_OK' => 'สร้างฐานข้อมูล %s แล้ว',
+ 'CRON_CREATED_OK' => 'สร้างงาน Cron แล้ว',
+ 'IP_CREATED_OK' => 'สร้างที่อยู่ IP %s แล้ว',
+ 'PACKAGE_CREATED_OK' => 'สร้างแพ็กเกจ %s แล้ว',
+ 'SSL_GENERATED_OK' => 'สร้าง SSL Certificate แล้ว',
+ 'RULE_CREATED_OK' => 'สร้างกฎแล้ว',
+ 'BANLIST_CREATED_OK' => 'สร้างรายการแบนหมายเลข IP แล้ว',
'Autoupdate has been successfully enabled' => 'เปิดใช้งานการอัพเดทอัตโนมัติสำเร็จแล้ว',
'Autoupdate has been successfully disabled' => 'ปิดใช้งานการอัพเดทอัตโนมัติสำเร็จแล้ว',
- 'Cronjob email reporting has been successfully enabled' => 'การรายงานทางอีเมลของ Cronjob ได้รับการเปิดใช้งานเรียบร้อยแล้ว',
- 'Cronjob email reporting has been successfully disabled' => 'การรายงานทางอีเมลของ Cronjob ได้รับการปิดใช้งานเรียบร้อยแล้ว',
+ 'Cronjob email reporting has been successfully enabled' => 'เปิดการรายงานทางอีเมลของ Cronjob แล้ว',
+ 'Cronjob email reporting has been successfully disabled' => 'ปิดการรายงานทางอีเมลของ Cronjob แล้ว',
'Changes has been saved.' => 'บันทึกการเปลี่ยนแปลงแล้ว',
'Confirmation' => 'การยืนยัน',
- 'DELETE_USER_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบผู้ใช้ %s?',
- 'SUSPEND_USER_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับผู้ใช้ %s?',
- 'UNSUSPEND_USER_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานผู้ใช้ %s?',
- 'DELETE_DOMAIN_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบโดเมน %s?',
- 'SUSPEND_DOMAIN_CONFIRMATION' => 'แน่ใจหรือไม่ว่าคุณต้องการ ระงับโดเมน %s?',
- 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานโดเมน %s?',
- 'DELETE_RECORD_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบ Record %s?',
- 'SUSPEND_RECORD_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับ Record %s?',
- 'UNSUSPEND_RECORD_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งาน Record %s?',
- 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'คุณแน่ใจหรือว่าต้องการ ลบเมล์ %s?',
- 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับเมล์ %s?',
- 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานเมล์ %s?',
- 'DELETE_DATABASE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบฐานข้อมูล %s?',
- 'SUSPEND_DATABASE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับฐานข้อมูล %s?',
- 'UNSUSPEND_DATABASE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานฐานข้อมูล %s?',
- 'DELETE_CRON_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบ cron job?',
- 'SUSPEND_CRON_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับ cron job?',
- 'UNSUSPEND_CRON_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งาน cron job?',
- 'DELETE_BACKUP_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบการสำรองข้อมูล %s?',
- 'DELETE_EXCLUSION_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบ %s ในการยกเว้น?',
- 'DELETE_PACKAGE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบแพ็กเกจ %s?',
- 'DELETE_IP_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบ IP address %s?',
- 'DELETE_RULE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบ rule #%s?',
- 'SUSPEND_RULE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับ rule #%s?',
- 'UNSUSPEND_RULE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งาน rule #%s?',
- 'LEAVE_PAGE_CONFIRMATION' => 'ออกจากหน้านี้?',
- 'RESTART_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการเริ่มต้นใหม่ %s?',
+ 'DELETE_USER_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบผู้ใช้ %s',
+ 'SUSPEND_USER_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับผู้ใช้ %s',
+ 'UNSUSPEND_USER_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานผู้ใช้ %s',
+ 'DELETE_DOMAIN_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบโดเมน %s',
+ 'SUSPEND_DOMAIN_CONFIRMATION' => 'แน่ใจหรือไม่ว่าคุณต้องการ ระงับโดเมน %s',
+ 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานโดเมน %s',
+ 'DELETE_RECORD_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบรายการ %s',
+ 'SUSPEND_RECORD_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับรายการ %s',
+ 'UNSUSPEND_RECORD_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานรายการ %s',
+ 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'คุณแน่ใจหรือว่าต้องการ ลบเมล %s',
+ 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับเมล %s',
+ 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานเมล %s',
+ 'DELETE_DATABASE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบฐานข้อมูล %s',
+ 'SUSPEND_DATABASE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับฐานข้อมูล %s',
+ 'UNSUSPEND_DATABASE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานฐานข้อมูล %s',
+ 'DELETE_CRON_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบงาน cron',
+ 'SUSPEND_CRON_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับงาน cron',
+ 'UNSUSPEND_CRON_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งาน cron',
+ 'DELETE_BACKUP_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบการสำรองข้อมูล %s',
+ 'DELETE_EXCLUSION_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบ %s ในการยกเว้น',
+ 'DELETE_PACKAGE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบแพ็กเกจ %s',
+ 'DELETE_IP_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบที่อยู่ IP %s',
+ 'DELETE_RULE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ลบกฎ #%s',
+ 'SUSPEND_RULE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ ระงับกฎ #%s',
+ 'UNSUSPEND_RULE_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการ เปิดการใช้งานกฎ #%s',
+ 'LEAVE_PAGE_CONFIRMATION' => 'ออกจากหน้านี้',
+ 'RESTART_CONFIRMATION' => 'คุณแน่ใจหรือไม่ว่าต้องการเริ่มต้นใหม่ %s',
'Welcome' => 'ยินดีต้อนรับ',
'LOGGED_IN_AS' => 'เข้าสู่ระบบในฐานะผู้ใช้ %s',
'Error' => 'เกิดข้อผิดพลาด',
'Invalid username or password' => 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง',
'Invalid username or code' => 'ชื่อผู้ใช้หรือรหัสไม่ถูกต้อง',
'Passwords not match' => 'รหัสผ่านทั้งสองไม่ตรงกัน',
- 'Please enter valid email address.' => 'กรุณาใส่เมล์ที่ถูกต้อง',
+ 'Please enter valid email address.' => 'กรุณาใส่เมลที่ถูกต้อง',
'Field "%s" can not be blank.' => 'ช่อง "%s" ไม่สามารถเว้นว่างไว้',
'Password is too short.' => 'รหัสผ่านสั้นเกินไป (ต่ำสุด 6 ตัวอักษร)',
'Error code:' => 'รหัสข้อผิดพลาด: %s',
'SERVICE_ACTION_FAILED' => '"%s" "%s" ล้มเหลว',
- 'IP address is in use' => 'IP address กำลังใช้งานอยู่',
+ 'IP address is in use' => 'ที่อยู่ IP ถูกใช้งานอยู่',
'BACKUP_SCHEDULED' => 'มีการเพิ่มงานลงในคิวแล้ว คุณจะได้รับอีเมลแจ้งเตือนเมื่อการสำรองข้อมูลของคุณพร้อมสำหรับการดาวน์โหลด',
'BACKUP_EXISTS' => 'มีการสำรองข้อมูลอยู่ โปรดรอให้การสำรองข้อมูลในปัจจุบันเสร็จสิ้น',
'RESTORE_SCHEDULED' => 'มีการเพิ่มงานลงในคิวแล้ว คุณจะได้รับการแจ้งเตือนทางอีเมลเมื่อการคืนค่าเสร็จสิ้น',
@@ -521,7 +522,7 @@ $LANG['th'] = array(
'FTP login credentials' => 'ข้อมูลการเข้าสู่ระบบ FTP',
'FTP_ACCOUNT_READY' => "มีการสร้างบัญชี FTP และพร้อมใช้งานแล้ว\n\nโฮสต์: %s\nชื่อผู้ใช้: %s_%s\nรหัสผ่าน: %s\n\n--\nVesta Control Panel\n",
- 'Database Credentials' => 'ข้อมูลของฐานข้อมูล',
+ 'Database Credentials' => 'ข้อมูลการใช้งานฐานข้อมูล',
'DATABASE_READY' => "สร้างฐานข้อมูลเรียบร้อยแล้ว\n\nDatabase: %s\nชื่อ: %s\nรหัสผ่าน: %s\n%s\n\n--\nVesta Control Panel\n",
'forgot password' => 'ลืมรหัสผ่าน',
@@ -530,7 +531,7 @@ $LANG['th'] = array(
'Confirm Password' => 'ยืนยันรหัสผ่าน',
'Reset' => 'รีเซ็ต',
'Reset Code' => 'รหัสสำหรับรีเซ็ต',
- 'RESET_NOTICE' => '',
+ 'RESET_NOTICE' => 'แจ้งการ',
'RESET_CODE_SENT' => 'รหัสสำหรับรีเซ็ตรหัสผ่านถูกส่งไปยังที่อยู่อีเมลของคุณแล้ว
',
'MAIL_RESET_SUBJECT' => 'ตั้งค่ารหัสผ่านใหม่ที่ %s',
'PASSWORD_RESET_REQUEST' => "หากต้องการรีเซ็ตรหัสผ่านของแผงควบคุมโปรดไปที่ลิงก์นี้:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatively, คุณอาจจะไปที่ https://%s/reset/?action=code&user=%s และใส่รหัสรีเซ็ตดังต่อไปนี้:\n%s\n\nหากคุณไม่ได้ขอรหัสผ่านใหม่โปรดละเว้นข้อความนี้และยอมรับคำขอโทษของเรา\n\n--\nVesta Control Panel\n",
@@ -548,41 +549,41 @@ $LANG['th'] = array(
'Nov' => 'พ.ย.',
'Dec' => 'ธ.ค.',
- 'Configuring Server' => 'การกำหนดค่าเซิฟเวอร์',
+ 'Configuring Server' => 'การกำหนดค่าเซิร์ฟเวอร์',
'Hostname' => 'Hostname',
'Time Zone' => 'เขตเวลา',
'Default Language' => 'ภาษาเริ่มต้น',
- 'Proxy Server' => 'Proxy Server',
- 'Web Server' => 'Web Server',
- 'Backend Server' => 'Backend Server',
- 'Backend Pool Mode' => 'Backend Pool Mode',
- 'DNS Server' => 'DNS Server',
+ 'Proxy Server' => 'เซิร์ฟเวอร์ Proxy',
+ 'Web Server' => 'เซิร์ฟเวอร์เว็บ',
+ 'Backend Server' => 'เซิร์ฟเวอร์ Backend',
+ 'Backend Pool Mode' => 'โหมด Backend Pool',
+ 'DNS Server' => 'เซิร์ฟเวอร์ DNS',
'DNS Cluster' => 'DNS Cluster',
- 'MAIL Server' => 'MAIL Server',
- 'Antivirus' => 'Antivirus',
- 'AntiSpam' => 'AntiSpam',
+ 'MAIL Server' => 'เซิร์ฟเวอร์เมล',
+ 'Antivirus' => 'ป้องกันไวรัส',
+ 'AntiSpam' => 'ป้องกันเมลขยะ',
'Webmail URL' => 'Webmail URL',
'MySQL Support' => 'สนับสนุน MySQL',
- 'phpMyAdmin URL' => 'ที่อยู่ของ phpMyAdmin',
+ 'phpMyAdmin URL' => 'phpMyAdmin URL',
'PostgreSQL Support' => 'สนับสนุน PostgreSQL',
- 'phpPgAdmin URL' => 'ที่อยู่ของ phpPgAdmin',
+ 'phpPgAdmin URL' => 'phpPgAdmin URL',
'Maximum Number Of Databases' => 'จำนวนฐานข้อมูลสูงสุด',
'Current Number Of Databases' => 'จำนวนฐานข้อมูลปัจจุบัน',
- 'Local backup' => 'สำรองข้อมูลท้องถิ่น',
+ 'Local backup' => 'สำรองข้อมูลภายใน',
'Compression level' => 'ระดับการบีบอัด',
'Directory' => 'ไดเร็กทอรี่',
- 'Remote backup' => 'การสำรองข้อมูลระยะไกล',
+ 'Remote backup' => 'การสำรองข้อมูลภายนอก',
'ftp' => 'FTP',
'sftp' => 'SFTP',
'SFTP Chroot' => 'SFTP Chroot',
- 'FileSystem Disk Quota' => 'FileSystem Disk Quota',
+ 'FileSystem Disk Quota' => 'โควต้าการเก็บข้อมูลในระบบ',
'Vesta Control Panel Plugins' => 'ปลั๊กอิน Vesta Control Panel',
'preview' => 'ดูตัวอย่าง',
'Reseller Role' => 'บทบาท Reseller',
'Web Config Editor' => 'เครื่องมือแก้ไขการตั้งค่าเว็บ',
'Template Manager' => 'ตัวจัดการ Template',
'Backup Migration Manager' => 'ตัวจัดการการย้ายข้อมูลสำรอง',
- 'FileManager' => 'FileManager',
+ 'FileManager' => 'ตัวจัดการไฟล์',
'show: CPU / MEM / NET / DISK' => 'แสดง: CPU / MEM / NET / DISK',
'sort by' => 'จัดเรียงโดย',
@@ -592,7 +593,7 @@ $LANG['th'] = array(
'save to favorites' => 'บันทึกในรายการโปรด',
- 'File Manager' => 'File Manager',
+ 'File Manager' => 'ตัวจัดการไฟล์',
'size' => 'ขนาด',
'date' => 'วันที่',
'name' => 'ชื่อ',
@@ -608,8 +609,8 @@ $LANG['th'] = array(
'ARCHIVE' => 'เก็บถาวร',
'EXTRACT' => 'แตกไฟล์',
'DOWNLOAD' => 'ดาวน์โหลด',
- 'Are you sure?' => 'คุณแน่ใจ?',
- 'Hit' => 'Hit',
+ 'Are you sure?' => 'คุณแน่ใจหรือไม่',
+ 'Hit' => 'จำนวนการเข้าถึง',
'to reload the page' => 'เพื่อโหลดหน้าเว็บใหม่',
'Directory name cannot be empty' => 'ชื่อไดเร็กทอรี่ต้องไม่ว่างเปล่า',
'File name cannot be empty' => 'ชื่อไฟล์ต้องไม่ว่างเปล่า',
@@ -629,7 +630,7 @@ $LANG['th'] = array(
'Extract' => 'แตกไฟล์',
'Create' => 'สร้าง',
'Compress' => 'บีบอัด',
- 'OK' => 'โอเค',
+ 'OK' => 'ตกลง',
'YOU ARE COPYING' => 'คุณกำลังคัดลอก',
'YOU ARE REMOVING' => 'คุณกำลังลบ',
'Delete items' => 'ลบรายการ',
@@ -667,7 +668,7 @@ $LANG['th'] = array(
'Go to CRON list' => 'ไปที่รายการ CRON',
'Go to BACKUP list' => 'ไปที่รายการ สำรองข้อมูล',
'Focus on search' => 'มุ่งเน้นการค้นหา',
- 'Display/Close shortcuts' => 'แสดง/ปิด shortcuts',
+ 'Display/Close shortcuts' => 'แสดง/ปิดทางลัด',
'Move backward through top menu' => 'เลื่อนกลับไปที่เมนูด้านบน',
'Move forward through top menu' => 'เลื่อนไปข้างหน้าผ่านเมนูด้านบน',
'Enter focused element' => 'ใส่องค์ประกอบที่เน้น',
@@ -696,7 +697,7 @@ $LANG['th'] = array(
'Add File to the Current Selection' => 'เพิ่มไฟล์ในการเลือกปัจจุบัน',
'Select All Files' => 'เลือกไฟล์ทั้งหมด',
'shortcuts are inspired by magnificent GNU Midnight Commander file manager' =>
- 'shortcuts are inspired by magnificent GNU Midnight Commander file manager',
+ 'ทางลัดต่างๆ ได้แรงบันดาลใจจากตัวจัดการไฟล์ magnificent GNU Midnight Commander',
'Licence Key' => 'License Key',
'Enter License Key' => 'กรอก License Key',
@@ -705,7 +706,7 @@ $LANG['th'] = array(
'Disable and Cancel License' => 'ปิดการใช้งาน และยกเลิก License',
'Licence Activated' => 'เปิดใช้งาน License แล้ว',
'Licence Deactivated' => 'ปิดการใช้งาน License แล้ว',
- 'Restrict users so that they cannot use SSH and access only their home directory.' => 'จำกัดผู้ใช้เพื่อไม่ให้ใช้ SSH และเข้าถึงไดเร็กทอรี่บ้านเท่านั้น',
+ 'Restrict users so that they cannot use SSH and access only their home directory.' => 'จำกัดผู้ใช้เพื่อไม่ให้ใช้ SSH และเข้าถึงไดเร็กทอรี่ของตนเองเท่านั้น',
'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'เรียกดู, คัดลอก, แก้ไข, ดู, และเรียกค้นหาไฟล์โดเมนทั้งหมดของเว็บโดยใช้ตัวจัดการไฟล์ที่มีคุณลักษณะครบถ้วน',
'This is a commercial module, you would need to purchace license key to enable it.' => 'สิ่งนี้ไม่ใช่โมดูลฟรี, คุณจะต้องซื้อ License Key เพื่อเปิดใช้งาน',
@@ -746,14 +747,14 @@ $LANG['th'] = array(
'PUB_KEY' => 'PUB_KEY',
'ISSUER' => 'ISSUER',
- 'Use server hostname' => 'ใช้ server hostname',
- 'Use domain hostname' => 'ใช้ domain hostname',
+ 'Use server hostname' => 'ใช้ hostname ของเซิร์ฟเวอร์',
+ 'Use domain hostname' => 'ใช้ hostname ของโดเมน',
'Use STARTTLS' => 'ใช้ STARTTLS',
'Use SSL / TLS' => 'ใช้ SSL / TLS',
- 'No encryption' => 'ไม่มี encryption',
- 'Do not use encryption' => 'ไม่ใช้ encryption',
+ 'No encryption' => 'ไม่มีการเข้ารหัส',
+ 'Do not use encryption' => 'ไม่ใช้การเข้ารหัส',
'maximum characters length, including prefix' => 'ความยาว charset สูงสุด %s ตัว, รวมถึงคำนำหน้า',
- 'Email Credentials' => 'Email Credentials',
+ 'Email Credentials' => 'ข้อมูลการใช้อีเมล',
);