From 975543788d6ad8cb1ea7bfd5f61593bf181dd7f9 Mon Sep 17 00:00:00 2001 From: Phinitnan Chanasabaeng Date: Sat, 13 Feb 2016 15:43:13 +0700 Subject: [PATCH] Delete old Nginx's Drupal template --- .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../7/templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- 2 files changed, 199 deletions(-) delete mode 100644 install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - 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 / { - 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 { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # 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 ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - 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; - } - - location ~ \..*/.*\.php$ { - 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 / { - 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 { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # 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 ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -}