From 085924c5d290a320842c662c9f248c51456b9371 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:49:14 +0100 Subject: [PATCH 01/16] Create http2.stpl Use http2 for faster loading, this requires https. --- install/rhel/6/templates/web/nginx/http2.stpl | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 install/rhel/6/templates/web/nginx/http2.stpl diff --git a/install/rhel/6/templates/web/nginx/http2.stpl b/install/rhel/6/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..40e79aef1 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/http2.stpl @@ -0,0 +1,35 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} From f46e7cfb1dc35b290a1657de4b0694508dd54e14 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:49:58 +0100 Subject: [PATCH 02/16] Create http2.tpl No http2 support when HTTPS is not active... --- install/rhel/6/templates/web/nginx/http2.tpl | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 install/rhel/6/templates/web/nginx/http2.tpl diff --git a/install/rhel/6/templates/web/nginx/http2.tpl b/install/rhel/6/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..826276bd2 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/http2.tpl @@ -0,0 +1,32 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} From 79f462488919d169b7581cba7979929ba0328d1c Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:53:15 +0100 Subject: [PATCH 03/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- install/rhel/7/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ install/rhel/7/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/rhel/7/templates/web/nginx/http2.stpl create mode 100644 install/rhel/7/templates/web/nginx/http2.tpl diff --git a/install/rhel/7/templates/web/nginx/http2.stpl b/install/rhel/7/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/rhel/7/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/rhel/7/templates/web/nginx/http2.tpl b/install/rhel/7/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/rhel/7/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 12e81b5eae255c98ec4ecfc021e472579e35cf80 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:53:38 +0100 Subject: [PATCH 04/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- install/rhel/5/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ install/rhel/5/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/rhel/5/templates/web/nginx/http2.stpl create mode 100644 install/rhel/5/templates/web/nginx/http2.tpl diff --git a/install/rhel/5/templates/web/nginx/http2.stpl b/install/rhel/5/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/rhel/5/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/rhel/5/templates/web/nginx/http2.tpl b/install/rhel/5/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/rhel/5/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 2ac5b87c0b10e226e4666b862428b86845c9a8dd Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:54:24 +0100 Subject: [PATCH 05/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../debian/8/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../debian/8/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/debian/8/templates/web/nginx/http2.stpl create mode 100644 install/debian/8/templates/web/nginx/http2.tpl diff --git a/install/debian/8/templates/web/nginx/http2.stpl b/install/debian/8/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/debian/8/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/debian/8/templates/web/nginx/http2.tpl b/install/debian/8/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/debian/8/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 1af0bfac93918f16580064329751d3f6c156a955 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:54:45 +0100 Subject: [PATCH 06/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../debian/7/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../debian/7/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/debian/7/templates/web/nginx/http2.stpl create mode 100644 install/debian/7/templates/web/nginx/http2.tpl diff --git a/install/debian/7/templates/web/nginx/http2.stpl b/install/debian/7/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/debian/7/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/debian/7/templates/web/nginx/http2.tpl b/install/debian/7/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/debian/7/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 6764196d727d859f763627b927c60de15ad035b8 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:55:37 +0100 Subject: [PATCH 07/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../12.04/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../12.04/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/12.04/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/12.04/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/12.04/templates/web/nginx/http2.stpl b/install/ubuntu/12.04/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/12.04/templates/web/nginx/http2.tpl b/install/ubuntu/12.04/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 6a7497757996eecd45bad319d1bbca76a07d525f Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:56:02 +0100 Subject: [PATCH 08/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../12.10/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../12.10/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/12.10/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/12.10/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/12.10/templates/web/nginx/http2.stpl b/install/ubuntu/12.10/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/12.10/templates/web/nginx/http2.tpl b/install/ubuntu/12.10/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 3df95c99ddc914ca3e4e5880ff5c402e8266c356 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:56:22 +0100 Subject: [PATCH 09/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../13.04/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../13.04/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/13.04/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/13.04/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/13.04/templates/web/nginx/http2.stpl b/install/ubuntu/13.04/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/13.04/templates/web/nginx/http2.tpl b/install/ubuntu/13.04/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From f42cb0563bc287ce71b87cb6179b0efc884f7485 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:56:39 +0100 Subject: [PATCH 10/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../13.10/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../13.10/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/13.10/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/13.10/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/13.10/templates/web/nginx/http2.stpl b/install/ubuntu/13.10/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/13.10/templates/web/nginx/http2.tpl b/install/ubuntu/13.10/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 96f4e1ff1062758c070673b4c8c6b752847fa6d2 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:56:59 +0100 Subject: [PATCH 11/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../14.04/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../14.04/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/14.04/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/14.04/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/14.04/templates/web/nginx/http2.stpl b/install/ubuntu/14.04/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/14.04/templates/web/nginx/http2.tpl b/install/ubuntu/14.04/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 8134478e565a81e28e3e0819e6e88cc7977f61c6 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:57:22 +0100 Subject: [PATCH 12/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../14.10/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../14.10/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/14.10/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/14.10/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/14.10/templates/web/nginx/http2.stpl b/install/ubuntu/14.10/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/14.10/templates/web/nginx/http2.tpl b/install/ubuntu/14.10/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 9ca1a75a73b31b12527e7ebea38d8aa578c46757 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:57:41 +0100 Subject: [PATCH 13/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../15.04/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../15.04/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/15.04/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/15.04/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/15.04/templates/web/nginx/http2.stpl b/install/ubuntu/15.04/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/15.04/templates/web/nginx/http2.tpl b/install/ubuntu/15.04/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From f532ca351b4f80af946a909ae5eb565942753287 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:57:59 +0100 Subject: [PATCH 14/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../15.10/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../15.10/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/15.10/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/15.10/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/15.10/templates/web/nginx/http2.stpl b/install/ubuntu/15.10/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/15.10/templates/web/nginx/http2.tpl b/install/ubuntu/15.10/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From 9fc3f877cfc2521999c46e9d5b341f20f7ad4b86 Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:58:20 +0100 Subject: [PATCH 15/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../16.04/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../16.04/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/16.04/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/16.04/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/16.04/templates/web/nginx/http2.stpl b/install/ubuntu/16.04/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/16.04/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/16.04/templates/web/nginx/http2.tpl b/install/ubuntu/16.04/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/16.04/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} + From a5798a945e35dbda38079bedbaacdac85b4bf3dd Mon Sep 17 00:00:00 2001 From: Robin Dirksen Date: Thu, 2 Mar 2017 10:58:42 +0100 Subject: [PATCH 16/16] HTTP2 support Adds HTTP2 support for NGINX when using the http2 nginx template (only when HTTPS is enabled). --- .../16.10/templates/web/nginx/http2.stpl | 36 +++++++++++++++++++ .../16.10/templates/web/nginx/http2.tpl | 33 +++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 install/ubuntu/16.10/templates/web/nginx/http2.stpl create mode 100644 install/ubuntu/16.10/templates/web/nginx/http2.tpl diff --git a/install/ubuntu/16.10/templates/web/nginx/http2.stpl b/install/ubuntu/16.10/templates/web/nginx/http2.stpl new file mode 100644 index 000000000..76dd2f8ec --- /dev/null +++ b/install/ubuntu/16.10/templates/web/nginx/http2.stpl @@ -0,0 +1,36 @@ +server { + listen %ip%:%proxy_ssl_port% http2; + server_name %domain_idn% %alias_idn%; + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %sdocroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass https://%ip%:%web_ssl_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/ubuntu/16.10/templates/web/nginx/http2.tpl b/install/ubuntu/16.10/templates/web/nginx/http2.tpl new file mode 100644 index 000000000..c1fec114f --- /dev/null +++ b/install/ubuntu/16.10/templates/web/nginx/http2.tpl @@ -0,0 +1,33 @@ +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + error_log /var/log/httpd/domains/%domain%.error.log error; + + location / { + proxy_pass http://%ip%:%web_port%; + location ~* ^.+\.(%proxy_extentions%)$ { + root %docroot%; + access_log /var/log/httpd/domains/%domain%.log combined; + access_log /var/log/httpd/domains/%domain%.bytes bytes; + expires max; + try_files $uri @fallback; + } + } + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location @fallback { + proxy_pass http://%ip%:%web_port%; + } + + location ~ /\.ht {return 404;} + location ~ /\.svn/ {return 404;} + location ~ /\.git/ {return 404;} + location ~ /\.hg/ {return 404;} + location ~ /\.bzr/ {return 404;} + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} +