From 780641b9ce9de1e156c3458c7ad4be4f7da838c2 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 10 Jun 2013 11:03:14 +0300 Subject: [PATCH] updated templates and packages --- install/0.9.8/rhel/packages/default.pkg | 4 +- install/0.9.8/rhel/packages/gainsboro.pkg | 4 +- install/0.9.8/rhel/packages/palegreen.pkg | 8 ++-- install/0.9.8/rhel/packages/slategrey.pkg | 4 +- .../rhel/templates/web/nginx/caching.stpl | 2 - .../rhel/templates/web/nginx/caching.tpl | 2 - .../rhel/templates/web/nginx/default.tpl | 2 - .../0.9.8/rhel/templates/web/nginx/hosting.sh | 11 ++++++ .../rhel/templates/web/nginx/hosting.stpl | 38 +++++++++++++++++++ .../rhel/templates/web/nginx/hosting.tpl | 35 +++++++++++++++++ 10 files changed, 98 insertions(+), 12 deletions(-) create mode 100755 install/0.9.8/rhel/templates/web/nginx/hosting.sh create mode 100755 install/0.9.8/rhel/templates/web/nginx/hosting.stpl create mode 100755 install/0.9.8/rhel/templates/web/nginx/hosting.tpl diff --git a/install/0.9.8/rhel/packages/default.pkg b/install/0.9.8/rhel/packages/default.pkg index df281e4f..29585bac 100644 --- a/install/0.9.8/rhel/packages/default.pkg +++ b/install/0.9.8/rhel/packages/default.pkg @@ -1,4 +1,6 @@ -TEMPLATE='default' +WEB_TEMPLATE='default' +PROXY_TEMPLATE='default' +DNS_TEMPLATE='default' WEB_DOMAINS='100' WEB_ALIASES='100' DNS_DOMAINS='100' diff --git a/install/0.9.8/rhel/packages/gainsboro.pkg b/install/0.9.8/rhel/packages/gainsboro.pkg index 28f0fb90..c3df5025 100644 --- a/install/0.9.8/rhel/packages/gainsboro.pkg +++ b/install/0.9.8/rhel/packages/gainsboro.pkg @@ -1,4 +1,6 @@ -TEMPLATE='default' +WEB_TEMPLATE='default' +PROXY_TEMPLATE='default' +DNS_TEMPLATE='default' WEB_DOMAINS='10' WEB_ALIASES='10' DNS_DOMAINS='10' diff --git a/install/0.9.8/rhel/packages/palegreen.pkg b/install/0.9.8/rhel/packages/palegreen.pkg index 73f58105..d08930f7 100644 --- a/install/0.9.8/rhel/packages/palegreen.pkg +++ b/install/0.9.8/rhel/packages/palegreen.pkg @@ -1,4 +1,6 @@ -TEMPLATE='hosting' +WEB_TEMPLATE='hosting' +PROXY_TEMPLATE='hosting' +DNS_TEMPLATE='default' WEB_DOMAINS='50' WEB_ALIASES='50' DNS_DOMAINS='50' @@ -12,5 +14,5 @@ BANDWIDTH='50000' NS='ns1.localhost.ltd,ns2.localhost.ltd' SHELL='nologin' BACKUPS='5' -TIME='11:31:31' -DATE='2012-07-26' +TIME='07:49:47' +DATE='2013-06-10' diff --git a/install/0.9.8/rhel/packages/slategrey.pkg b/install/0.9.8/rhel/packages/slategrey.pkg index f3de2007..15a17dcd 100644 --- a/install/0.9.8/rhel/packages/slategrey.pkg +++ b/install/0.9.8/rhel/packages/slategrey.pkg @@ -1,4 +1,6 @@ -TEMPLATE='default' +WEB_TEMPLATE='default' +PROXY_TEMPLATE='default' +DNS_TEMPLATE='default' WEB_DOMAINS='100' WEB_ALIASES='100' DNS_DOMAINS='100' diff --git a/install/0.9.8/rhel/templates/web/nginx/caching.stpl b/install/0.9.8/rhel/templates/web/nginx/caching.stpl index a916acb9..be65e36f 100755 --- a/install/0.9.8/rhel/templates/web/nginx/caching.stpl +++ b/install/0.9.8/rhel/templates/web/nginx/caching.stpl @@ -40,7 +40,5 @@ server { location ~ /\.hg/ {return 404;} location ~ /\.bzr/ {return 404;} - disable_symlinks if_not_owner from=%home%/%user%; - include %home%/%user%/conf/nginx.%domain%.conf*; } diff --git a/install/0.9.8/rhel/templates/web/nginx/caching.tpl b/install/0.9.8/rhel/templates/web/nginx/caching.tpl index d5bbb767..467811e4 100755 --- a/install/0.9.8/rhel/templates/web/nginx/caching.tpl +++ b/install/0.9.8/rhel/templates/web/nginx/caching.tpl @@ -37,7 +37,5 @@ server { location ~ /\.hg/ {return 404;} location ~ /\.bzr/ {return 404;} - disable_symlinks if_not_owner from=%home%/%user%; - include %home%/%user%/conf/nginx.%domain%.conf*; } diff --git a/install/0.9.8/rhel/templates/web/nginx/default.tpl b/install/0.9.8/rhel/templates/web/nginx/default.tpl index 44d87496..c1fec114 100755 --- a/install/0.9.8/rhel/templates/web/nginx/default.tpl +++ b/install/0.9.8/rhel/templates/web/nginx/default.tpl @@ -28,8 +28,6 @@ server { location ~ /\.hg/ {return 404;} location ~ /\.bzr/ {return 404;} - disable_symlinks if_not_owner from=%docroot%; - include %home%/%user%/conf/web/nginx.%domain%.conf*; } diff --git a/install/0.9.8/rhel/templates/web/nginx/hosting.sh b/install/0.9.8/rhel/templates/web/nginx/hosting.sh new file mode 100755 index 00000000..eeed37ef --- /dev/null +++ b/install/0.9.8/rhel/templates/web/nginx/hosting.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Changing public_html permission +user="$1" +domain="$2" +ip="$3" +home_dir="$4" +docroot="$5" + +chmod 755 $docroot + +exit 0 diff --git a/install/0.9.8/rhel/templates/web/nginx/hosting.stpl b/install/0.9.8/rhel/templates/web/nginx/hosting.stpl new file mode 100755 index 00000000..aca458a4 --- /dev/null +++ b/install/0.9.8/rhel/templates/web/nginx/hosting.stpl @@ -0,0 +1,38 @@ +server { + listen %ip%:%proxy_ssl_port%; + 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;} + + disable_symlinks if_not_owner from=%docroot%; + + include %home%/%user%/conf/web/snginx.%domain%.conf*; +} + diff --git a/install/0.9.8/rhel/templates/web/nginx/hosting.tpl b/install/0.9.8/rhel/templates/web/nginx/hosting.tpl new file mode 100755 index 00000000..44d87496 --- /dev/null +++ b/install/0.9.8/rhel/templates/web/nginx/hosting.tpl @@ -0,0 +1,35 @@ +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;} + + disable_symlinks if_not_owner from=%docroot%; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} +