From 380f389d13e18c2274d08f35a6ea1bc078713511 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2011 23:03:41 +0300 Subject: [PATCH] added %elog% variable --- data/templates/apache_default.stpl | 2 +- data/templates/apache_default.tpl | 2 +- data/templates/apache_phpcgi.stpl | 2 +- data/templates/apache_phpcgi.tpl | 2 +- data/templates/apache_unlim.stpl | 2 +- data/templates/apache_unlim.tpl | 2 +- data/templates/ngingx_vhost_default.stpl | 11 ++++++----- data/templates/ngingx_vhost_default.tpl | 11 ++++++----- func/domain_func.sh | 3 ++- 9 files changed, 20 insertions(+), 17 deletions(-) diff --git a/data/templates/apache_default.stpl b/data/templates/apache_default.stpl index 3df011134..e8ec79f07 100644 --- a/data/templates/apache_default.stpl +++ b/data/templates/apache_default.stpl @@ -10,7 +10,7 @@ SuexecUserGroup %user% %group% CustomLog /var/log/httpd/domains/%domain%.bytes bytes CustomLog /var/log/httpd/domains/%domain%.log combined - #ErrorLog /var/log/httpd/domains/%domain%.error.log + %elog%ErrorLog /var/log/httpd/domains/%domain%.error.log AllowOverride AuthConfig FileInfo Indexes Limit SSLRequireSSL diff --git a/data/templates/apache_default.tpl b/data/templates/apache_default.tpl index 312a03ab9..437b94d98 100644 --- a/data/templates/apache_default.tpl +++ b/data/templates/apache_default.tpl @@ -10,7 +10,7 @@ SuexecUserGroup %user% %group% CustomLog /var/log/httpd/domains/%domain%.bytes bytes CustomLog /var/log/httpd/domains/%domain%.log combined - #ErrorLog /var/log/httpd/domains/%domain%.error.log + %elog%ErrorLog /var/log/httpd/domains/%domain%.error.log AllowOverride AuthConfig FileInfo Indexes Limit Options +Includes -Indexes +ExecCGI diff --git a/data/templates/apache_phpcgi.stpl b/data/templates/apache_phpcgi.stpl index 3df011134..e8ec79f07 100644 --- a/data/templates/apache_phpcgi.stpl +++ b/data/templates/apache_phpcgi.stpl @@ -10,7 +10,7 @@ SuexecUserGroup %user% %group% CustomLog /var/log/httpd/domains/%domain%.bytes bytes CustomLog /var/log/httpd/domains/%domain%.log combined - #ErrorLog /var/log/httpd/domains/%domain%.error.log + %elog%ErrorLog /var/log/httpd/domains/%domain%.error.log AllowOverride AuthConfig FileInfo Indexes Limit SSLRequireSSL diff --git a/data/templates/apache_phpcgi.tpl b/data/templates/apache_phpcgi.tpl index 2480bbdca..332deda54 100644 --- a/data/templates/apache_phpcgi.tpl +++ b/data/templates/apache_phpcgi.tpl @@ -10,7 +10,7 @@ SuexecUserGroup %user% %group% CustomLog /var/log/httpd/domains/%domain%.bytes bytes CustomLog /var/log/httpd/domains/%domain%.log combined - #ErrorLog /var/log/httpd/domains/%domain%.error.log + %elog%ErrorLog /var/log/httpd/domains/%domain%.error.log AllowOverride AuthConfig FileInfo Indexes Limit Options +Includes -Indexes +ExecCGI diff --git a/data/templates/apache_unlim.stpl b/data/templates/apache_unlim.stpl index de517aae8..e83c1ea4f 100644 --- a/data/templates/apache_unlim.stpl +++ b/data/templates/apache_unlim.stpl @@ -10,7 +10,7 @@ SuexecUserGroup %user% %group% CustomLog /var/log/httpd/domains/%domain%.bytes bytes CustomLog /var/log/httpd/domains/%domain%.log combined - ErrorLog /var/log/httpd/domains/%domain%.error.log + %elog%ErrorLog /var/log/httpd/domains/%domain%.error.log AllowOverride All SSLRequireSSL diff --git a/data/templates/apache_unlim.tpl b/data/templates/apache_unlim.tpl index c668ec6fd..5942d7bd5 100644 --- a/data/templates/apache_unlim.tpl +++ b/data/templates/apache_unlim.tpl @@ -10,7 +10,7 @@ SuexecUserGroup %user% %group% CustomLog /var/log/httpd/domains/%domain%.bytes bytes CustomLog /var/log/httpd/domains/%domain%.log combined - ErrorLog /var/log/httpd/domains/%domain%.error.log + %elog%ErrorLog /var/log/httpd/domains/%domain%.error.log AllowOverride All Options +Includes -Indexes +ExecCGI diff --git a/data/templates/ngingx_vhost_default.stpl b/data/templates/ngingx_vhost_default.stpl index dbdff4aaf..f441f4aa2 100644 --- a/data/templates/ngingx_vhost_default.stpl +++ b/data/templates/ngingx_vhost_default.stpl @@ -1,11 +1,11 @@ server { - listen %ip%:%proxy_port%; + listen %ip%:%proxy_ssl_port%; server_name %domain_idn% %alias_idn%; server_name_in_redirect off; - #error_log /var/log/httpd/domains/%domain%.error.log error; + %elog%error_log /var/log/httpd/domains/%domain%.error.log error; location / { - proxy_pass http://%ip%:%web_port%; + proxy_pass http://%ip%:%web_ssl_port%; location ~* ^.+\.(%extentions%)$ { root %docroot%; @@ -22,11 +22,12 @@ server { } location @fallback { - proxy_pass http://%ip%:%web_port%; + proxy_pass http://%ip%:%web_ssl_port%; } location ~ /\.ht {deny all;} location ~ /.svn/ {deny all;} - Include %home%/%user%/conf/%domain%.nginx.* + include %home%/%user%/conf/%domain%.nginx.*; } + diff --git a/data/templates/ngingx_vhost_default.tpl b/data/templates/ngingx_vhost_default.tpl index 40fcb442b..45a00628b 100644 --- a/data/templates/ngingx_vhost_default.tpl +++ b/data/templates/ngingx_vhost_default.tpl @@ -1,11 +1,11 @@ server { - listen %ip%:%proxy_ssl_port%; + listen %ip%:%proxy_port%; server_name %domain_idn% %alias_idn%; server_name_in_redirect off; - #error_log /var/log/httpd/domains/%domain%.error.log error; + %elog%error_log /var/log/httpd/domains/%domain%.error.log error; location / { - proxy_pass http://%ip%:%web_ssl_port%; + proxy_pass http://%ip%:%web_port%; location ~* ^.+\.(%extentions%)$ { root %docroot%; @@ -22,11 +22,12 @@ server { } location @fallback { - proxy_pass http://%ip%:%web_ssl_port%; + proxy_pass http://%ip%:%web_port%; } location ~ /\.ht {deny all;} location ~ /.svn/ {deny all;} - Include %home%/%user%/conf/%domain%.nginx.* + include %home%/%user%/conf/%domain%.nginx.*; } + diff --git a/func/domain_func.sh b/func/domain_func.sh index 040ba96e6..b042b1278 100644 --- a/func/domain_func.sh +++ b/func/domain_func.sh @@ -238,7 +238,8 @@ httpd_add_config() { -e "s/%alias%/${aliases//,/ }/g" \ -e "s/%ssl_cert%/${ssl_cert////\/}/g" \ -e "s/%ssl_key%/${ssl_key////\/}/g" \ - -e "s/%extentions%/$extentions/g" \ + -e "s/%extentions%/${extentions//,/|}/g" \ + -e "s/%elog%/$elog/g" \ >> $conf }