Эх сурвалжийг харах

updated templates and packages

Serghey Rodin 12 жил өмнө
parent
commit
780641b9ce

+ 3 - 1
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'

+ 3 - 1
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'

+ 5 - 3
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'

+ 3 - 1
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'

+ 0 - 2
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*;
 }

+ 0 - 2
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*;
 }

+ 0 - 2
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*;
 }
 

+ 11 - 0
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

+ 38 - 0
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*;
+}
+

+ 35 - 0
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*;
+}
+