From 503a2df590d6dbc0308b15801089637bf3c5b804 Mon Sep 17 00:00:00 2001 From: mikorist <31393531+mikorist@users.noreply.github.com> Date: Mon, 20 Nov 2017 16:57:18 +0100 Subject: [PATCH 01/32] Update nginx.conf Added timer_resolution 50ms; In order to free some CPU cycles Updated Cloudflare's IP addresses --- install/debian/8/nginx/nginx.conf | 45 ++++++++++++++++--------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/install/debian/8/nginx/nginx.conf b/install/debian/8/nginx/nginx.conf index 1932d171f..b9817bb98 100644 --- a/install/debian/8/nginx/nginx.conf +++ b/install/debian/8/nginx/nginx.conf @@ -1,7 +1,8 @@ # Server globals -user www-data; -worker_processes auto; +user www-data; +worker_processes auto; worker_rlimit_nofile 65535; +timer_resolution 50ms; #In order to free some CPU cycles error_log /var/log/nginx/error.log crit; pid /var/run/nginx.pid; @@ -70,25 +71,27 @@ http { # Cloudflare https://www.cloudflare.com/ips - set_real_ip_from 199.27.128.0/21; - set_real_ip_from 173.245.48.0/20; - set_real_ip_from 103.21.244.0/22; - set_real_ip_from 103.22.200.0/22; - set_real_ip_from 103.31.4.0/22; - set_real_ip_from 141.101.64.0/18; - set_real_ip_from 108.162.192.0/18; - set_real_ip_from 190.93.240.0/20; - set_real_ip_from 188.114.96.0/20; - set_real_ip_from 197.234.240.0/22; - set_real_ip_from 198.41.128.0/17; - set_real_ip_from 162.158.0.0/15; - set_real_ip_from 104.16.0.0/12; - set_real_ip_from 172.64.0.0/13; - #set_real_ip_from 2400:cb00::/32; - #set_real_ip_from 2606:4700::/32; - #set_real_ip_from 2803:f800::/32; - #set_real_ip_from 2405:b500::/32; - #set_real_ip_from 2405:8100::/32; + set_real_ip_from 103.21.244.0/22; + set_real_ip_from 103.22.200.0/22; + set_real_ip_from 103.31.4.0/22; + set_real_ip_from 104.16.0.0/12; + set_real_ip_from 108.162.192.0/18; + set_real_ip_from 131.0.72.0/22; + set_real_ip_from 141.101.64.0/18; + set_real_ip_from 162.158.0.0/15; + set_real_ip_from 172.64.0.0/13; + set_real_ip_from 173.245.48.0/20; + set_real_ip_from 188.114.96.0/20; + set_real_ip_from 190.93.240.0/20; + set_real_ip_from 197.234.240.0/22; + set_real_ip_from 198.41.128.0/17; + set_real_ip_from 2400:cb00::/32; + set_real_ip_from 2606:4700::/32; + set_real_ip_from 2803:f800::/32; + set_real_ip_from 2405:b500::/32; + set_real_ip_from 2405:8100::/32; + set_real_ip_from 2c0f:f248::/32; + set_real_ip_from 2a06:98c0::/29; real_ip_header CF-Connecting-IP; From 43fdf7a1cc79f19f606680af8e9cc0883f03b71d Mon Sep 17 00:00:00 2001 From: dpeca Date: Mon, 20 Nov 2017 17:06:01 +0100 Subject: [PATCH 02/32] blank space indent fix --- install/debian/8/nginx/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/debian/8/nginx/nginx.conf b/install/debian/8/nginx/nginx.conf index b9817bb98..1eef1672c 100644 --- a/install/debian/8/nginx/nginx.conf +++ b/install/debian/8/nginx/nginx.conf @@ -1,6 +1,6 @@ # Server globals -user www-data; -worker_processes auto; +user www-data; +worker_processes auto; worker_rlimit_nofile 65535; timer_resolution 50ms; #In order to free some CPU cycles error_log /var/log/nginx/error.log crit; From 9dc5220ab2edb9459f3f6218c9798269844b54f4 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Mon, 20 Nov 2017 22:07:14 +0300 Subject: [PATCH 03/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/rhel/5/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/rhel/5/templates/web/nginx/php-fpm/opencart.tpl b/install/rhel/5/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From f279b0d97c23936fdc2cf7919ed1cab88e005799 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Mon, 20 Nov 2017 22:08:26 +0300 Subject: [PATCH 04/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/rhel/5/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/rhel/5/templates/web/nginx/php-fpm/opencart.stpl b/install/rhel/5/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From d578912cfba622ae10b42b9de305ac5b17ea3659 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Mon, 20 Nov 2017 22:09:43 +0300 Subject: [PATCH 05/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/rhel/6/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/rhel/6/templates/web/nginx/php-fpm/opencart.tpl b/install/rhel/6/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From da54653fe1d1d49d851ccee8088b8bb8c2a9a568 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Mon, 20 Nov 2017 22:10:09 +0300 Subject: [PATCH 06/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/rhel/6/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/rhel/6/templates/web/nginx/php-fpm/opencart.stpl b/install/rhel/6/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From 968a7a87297983098f4ee9db0e6b86f094a0ddbe Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Mon, 20 Nov 2017 22:11:26 +0300 Subject: [PATCH 07/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/rhel/7/templates/web/nginx/php-fpm/opencart.tpl b/install/rhel/7/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From fd0b3dd66bf26ac9000a66d1cd11be8872e8f2da Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Mon, 20 Nov 2017 22:11:59 +0300 Subject: [PATCH 08/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/rhel/7/templates/web/nginx/php-fpm/opencart.stpl b/install/rhel/7/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From cf6cf42fa0b9b36a32693350190a8f1340f5607f Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:09:18 +0300 Subject: [PATCH 09/32] New template for OpenCart CMS --- .../templates/web/nginx/php5-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/debian/7/templates/web/nginx/php5-fpm/opencart.tpl diff --git a/install/debian/7/templates/web/nginx/php5-fpm/opencart.tpl b/install/debian/7/templates/web/nginx/php5-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From 520e2fa4cd3373c08167fe287391b44fc8ac5a51 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:09:48 +0300 Subject: [PATCH 10/32] New template for OpenCart CMS --- .../web/nginx/php5-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/debian/7/templates/web/nginx/php5-fpm/opencart.stpl diff --git a/install/debian/7/templates/web/nginx/php5-fpm/opencart.stpl b/install/debian/7/templates/web/nginx/php5-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From 158e9cb96ef0411c08835d29ef6d323f1d0ef798 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:11:26 +0300 Subject: [PATCH 11/32] New template for OpenCart CMS --- .../templates/web/nginx/php5-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/debian/8/templates/web/nginx/php5-fpm/opencart.tpl diff --git a/install/debian/8/templates/web/nginx/php5-fpm/opencart.tpl b/install/debian/8/templates/web/nginx/php5-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From 7af86f53c0cc2e6aeda582458ebdbeee6c2e2fdb Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:11:55 +0300 Subject: [PATCH 12/32] New template for OpenCart CMS --- .../web/nginx/php5-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/debian/8/templates/web/nginx/php5-fpm/opencart.stpl diff --git a/install/debian/8/templates/web/nginx/php5-fpm/opencart.stpl b/install/debian/8/templates/web/nginx/php5-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From a4368d1037ea8c8bcacd41260ed60ddd4e49c7d2 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:14:00 +0300 Subject: [PATCH 13/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/ubuntu/12.04/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From 12dbf39a146b14292ac75fb8295001abe47d687f Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:14:28 +0300 Subject: [PATCH 14/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/12.04/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/12.04/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/12.04/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From 3c85792a8bae0742b50ddff66c5feb885f3e7896 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:16:14 +0300 Subject: [PATCH 15/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/ubuntu/12.10/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From 9beecc7a9e2f7193ec1270afae0bb94ce91bd589 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:16:38 +0300 Subject: [PATCH 16/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/12.10/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/12.10/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/12.10/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From 76478dc18dcb50e75b908a5931ee639a7c880373 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:17:48 +0300 Subject: [PATCH 17/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/ubuntu/13.04/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From 456a118db7418a5cfe114209cd3731689d093922 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:18:12 +0300 Subject: [PATCH 18/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/13.04/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/13.04/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/13.04/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From 7f00a9d9b664ee53e087eccf2cdadf000c4d5765 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:19:21 +0300 Subject: [PATCH 19/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/ubuntu/13.10/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From 5a80d18744b63d0e903e26da42bacd119edfad5e Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:19:50 +0300 Subject: [PATCH 20/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/13.10/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/13.10/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/13.10/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From 5158cdcb3d3b583aa11db1737b3d38ac97b93079 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:23:21 +0300 Subject: [PATCH 21/32] New template for OpenCart CMS --- install/ubuntu/14.04/templates/web/nginx/php-fpm/opencart.tpl | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/opencart.tpl index 07b0cb90a..a6dec43bb 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php-fpm/opencart.tpl +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/opencart.tpl @@ -6,11 +6,8 @@ server { 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 / { - try_files $uri $uri/ @opencart; - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { expires max; } From b635f1694de20d9eec6b2c2dfcc0cc0616097dba Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:24:18 +0300 Subject: [PATCH 22/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/14.04/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/14.04/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/14.04/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From 6646d221695387dec696a36775a63e596695a820 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:25:28 +0300 Subject: [PATCH 23/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/ubuntu/14.10/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From c6e96ac4bd74d0f79a571b335d0ba7176fad6cb1 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:25:56 +0300 Subject: [PATCH 24/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/14.10/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/14.10/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/14.10/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From 9d43bcbdac6dc01fb0ad69df6b202eb31b54feaa Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:27:29 +0300 Subject: [PATCH 25/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/ubuntu/15.04/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From 8a7d6202041da597c750ad91ad4f5efaf39c1ed8 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:28:08 +0300 Subject: [PATCH 26/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/15.04/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/15.04/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/15.04/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From b8b8115e38ac9e3bf3bc70b28dbf1e5bd307c7ef Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:30:30 +0300 Subject: [PATCH 27/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/ubuntu/15.10/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From cc8c395c1a524b0849daf78f76985d5b078f0d49 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:31:13 +0300 Subject: [PATCH 28/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/15.10/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/15.10/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/15.10/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From 603a783a1031ebcbaa6b9a675d584d29ea1a3329 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:32:08 +0300 Subject: [PATCH 29/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/ubuntu/16.04/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From ce676dc620df7c37a91ce7e5e36c89dc2a5fae11 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:32:39 +0300 Subject: [PATCH 30/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/16.04/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/16.04/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/16.04/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/16.04/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +} From f7073ad995fdfb855d1974e606eb2ff0337bc2b8 Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:33:27 +0300 Subject: [PATCH 31/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.tpl | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 install/ubuntu/16.10/templates/web/nginx/php-fpm/opencart.tpl diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/opencart.tpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/opencart.tpl new file mode 100644 index 000000000..a6dec43bb --- /dev/null +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/opencart.tpl @@ -0,0 +1,49 @@ +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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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_idn%.conf*; +} From 0a934d93b983142c59b5f36fe91102bfc109b4fb Mon Sep 17 00:00:00 2001 From: Anton Reutov Date: Tue, 21 Nov 2017 02:33:54 +0300 Subject: [PATCH 32/32] New template for OpenCart CMS --- .../templates/web/nginx/php-fpm/opencart.stpl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/ubuntu/16.10/templates/web/nginx/php-fpm/opencart.stpl diff --git a/install/ubuntu/16.10/templates/web/nginx/php-fpm/opencart.stpl b/install/ubuntu/16.10/templates/web/nginx/php-fpm/opencart.stpl new file mode 100644 index 000000000..bf93eb969 --- /dev/null +++ b/install/ubuntu/16.10/templates/web/nginx/php-fpm/opencart.stpl @@ -0,0 +1,54 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %sdocroot%; + 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 / { + try_files $uri $uri/ @opencart; + 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; + include /etc/nginx/fastcgi_params; + } + } + + location @opencart { + rewrite ^/(.+)$ /index.php?_route_=$1 last; + } + + 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/snginx.%domain%.conf*; +}