Kristan Kenney 7 лет назад
Родитель
Сommit
c94980945f
34 измененных файлов с 41 добавлено и 44 удалено
  1. 5 9
      bin/v-add-mail-domain-ssl-force
  2. 1 1
      install/deb/multiphp/nginx/PHP-56.tpl
  3. 1 1
      install/deb/multiphp/nginx/PHP-70.tpl
  4. 1 1
      install/deb/multiphp/nginx/PHP-71.tpl
  5. 1 1
      install/deb/multiphp/nginx/PHP-72.tpl
  6. 1 1
      install/deb/multiphp/nginx/PHP-73.tpl
  7. 2 2
      install/deb/templates/mail/apache2/default.stpl
  8. 1 1
      install/deb/templates/mail/nginx/default.stpl
  9. 3 2
      install/deb/templates/mail/nginx/default.tpl
  10. 1 1
      install/deb/templates/web/nginx/caching.tpl
  11. 1 1
      install/deb/templates/web/nginx/default.tpl
  12. 1 1
      install/deb/templates/web/nginx/hosting.tpl
  13. 1 1
      install/deb/templates/web/nginx/php-fpm/cms_made_simple.tpl
  14. 1 1
      install/deb/templates/web/nginx/php-fpm/codeigniter2.tpl
  15. 1 1
      install/deb/templates/web/nginx/php-fpm/codeigniter3.tpl
  16. 1 1
      install/deb/templates/web/nginx/php-fpm/datalife_engine.tpl
  17. 1 1
      install/deb/templates/web/nginx/php-fpm/default.tpl
  18. 1 1
      install/deb/templates/web/nginx/php-fpm/dokuwiki.tpl
  19. 1 1
      install/deb/templates/web/nginx/php-fpm/drupal6.tpl
  20. 1 1
      install/deb/templates/web/nginx/php-fpm/drupal7.tpl
  21. 1 1
      install/deb/templates/web/nginx/php-fpm/drupal8.tpl
  22. 1 1
      install/deb/templates/web/nginx/php-fpm/joomla.tpl
  23. 1 1
      install/deb/templates/web/nginx/php-fpm/laravel.tpl
  24. 1 1
      install/deb/templates/web/nginx/php-fpm/magento.tpl
  25. 1 1
      install/deb/templates/web/nginx/php-fpm/modx.tpl
  26. 1 1
      install/deb/templates/web/nginx/php-fpm/moodle.tpl
  27. 1 1
      install/deb/templates/web/nginx/php-fpm/no-php.tpl
  28. 1 1
      install/deb/templates/web/nginx/php-fpm/odoo.tpl
  29. 1 1
      install/deb/templates/web/nginx/php-fpm/opencart.tpl
  30. 1 1
      install/deb/templates/web/nginx/php-fpm/owncloud.tpl
  31. 1 1
      install/deb/templates/web/nginx/php-fpm/piwik.tpl
  32. 1 1
      install/deb/templates/web/nginx/php-fpm/pyrocms.tpl
  33. 1 1
      install/deb/templates/web/nginx/php-fpm/sendy.tpl
  34. 1 1
      install/deb/templates/web/nginx/php-fpm/wordpress.tpl

+ 5 - 9
bin/v-add-mail-domain-ssl-force

@@ -43,27 +43,23 @@ if [ "$SSL" != 'yes' ]; then
     exit $E_NOTEXIST
 fi
 
+# Update mail templates
+$BIN/v-update-mail-templates
+
 # Check if proxy is active
+
 if [ ! -z "$PROXY_SYSTEM" ] || [ ! -z "$PROXY" ]; then
-    if ! grep --quiet "forcessl" $HESTIA/data/templates/mail/nginx/default.tpl; then
-        $BIN/v-update-mail-templates
-    fi
     forcessl="/home/$user/conf/mail/$domain/$PROXY_SYSTEM.forcessl.conf"
 else
-    if ! grep --quiet "forcessl" $HESTIA/data/templates/mail/nginx/default.tpl; then
-        $BIN/v-update-mail-templates
-    fi
     forcessl="/home/$user/conf/mail/$domain/$WEB_SYSTEM.forcessl.conf"
 fi
 
 # Insert redirect commands
-if [ ! -z $PROXY ]; then
+if [ ! -z "$PROXY_SYSTEM" ]; then
     echo 'return 301 https://$server_name$request_uri;' > $forcessl
-    ln -s $forcessl /etc/$PROXY_SYSTEM/conf.d/domains/$WEBMAIL_ALIAS.$domain.forcessl.conf
 else
     echo 'RewriteEngine On' > $forcessl
     echo 'RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]' >> $forcessl
-    ln -s $forcessl /etc/$WEB_SYSTEM/conf.d/domains/$WEBMAIL_ALIAS.$domain.forcessl.conf
 fi
 
 #----------------------------------------------------------#

+ 1 - 1
install/deb/multiphp/nginx/PHP-56.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
 

+ 1 - 1
install/deb/multiphp/nginx/PHP-70.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
 

+ 1 - 1
install/deb/multiphp/nginx/PHP-71.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
 

+ 1 - 1
install/deb/multiphp/nginx/PHP-72.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
 

+ 1 - 1
install/deb/multiphp/nginx/PHP-73.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
 

+ 2 - 2
install/deb/templates/mail/apache2/default.stpl

@@ -12,7 +12,7 @@
     SSLCertificateFile         %home%/%user%/conf/mail/%root_domain%/ssl/%root_domain%.crt
     SSLCertificateKeyFile      %home%/%user%/conf/mail/%root_domain%/ssl/%root_domain%.key
 
-   IncludeOptional %home%/%user%/conf/web/%root_domain%/apache2.forcessl.conf*
+    IncludeOptional %home%/%user%/conf/mail/%root_domain%/apache2.forcessl.conf*
     
     <Directory "/usr/share/tinymce/www/">
       Options Indexes MultiViews FollowSymLinks
@@ -30,7 +30,7 @@
         allow from all
     </Directory>
 
-    <Directory /usr/share/z-push>
+    <Directory /usr/share/z-push/>
         # Don't list a directory index, follow symlinks (maybe state dir is somewhere linked)
         DirectoryIndex index.php
         Options -Indexes +FollowSymLinks

+ 1 - 1
install/deb/templates/mail/nginx/default.stpl

@@ -52,6 +52,6 @@ server {
     location ~ /\.hg/   {return 404;}
     location ~ /\.bzr/  {return 404;}
 
-    include %home%/%user%/conf/mail/%root_domain%/nginx.ssl.conf_*;
+    include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.ssl.conf_*;
 }
 

+ 3 - 2
install/deb/templates/mail/nginx/default.tpl

@@ -2,7 +2,8 @@ server {
     listen      %ip%:%proxy_port%;
     server_name %domain% %alias%;
         
-    include %home%/%user%/conf/mail/%domain%/nginx.forcessl.conf*;
+    include %home%/%user%/conf/mail/%root_domain%/nginx.forcessl.conf*;
+
     location / {
         proxy_pass      http://%ip%:%web_port%;
         location ~* ^.+\.(jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm)$ {
@@ -38,5 +39,5 @@ server {
     location ~ /\.hg/   {return 404;}
     location ~ /\.bzr/  {return 404;}
 
-    include %home%/%user%/conf/mail/%root_domain%/nginx.conf_*;
+    include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.conf_*;
 }

+ 1 - 1
install/deb/templates/web/nginx/caching.tpl

@@ -2,7 +2,7 @@ server {
     listen      %ip%:%proxy_port%;
     server_name %domain_idn% %alias_idn%;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
         proxy_pass      http://%ip%:%web_port%;

+ 1 - 1
install/deb/templates/web/nginx/default.tpl

@@ -2,7 +2,7 @@ server {
     listen      %ip%:%proxy_port%;
     server_name %domain_idn% %alias_idn%;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
         proxy_pass      http://%ip%:%web_port%;

+ 1 - 1
install/deb/templates/web/nginx/hosting.tpl

@@ -2,7 +2,7 @@ server {
     listen      %ip%:%proxy_port%;
     server_name %domain_idn% %alias_idn%;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
         proxy_pass      http://%ip%:%web_port%;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/cms_made_simple.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
         try_files $uri $uri/ /index.php?page=$request_uri;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/codeigniter2.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
         try_files $uri $uri/ /index.php;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/codeigniter3.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
         try_files $uri $uri/ /index.php;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/datalife_engine.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
         rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/default.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
 

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/dokuwiki.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
         index doku.php;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/drupal6.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location = /favicon.ico {
         log_not_found off;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/drupal7.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location = /favicon.ico {
         log_not_found off;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/drupal8.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location = /favicon.ico {
         log_not_found off;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/joomla.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location / {
         try_files $uri $uri/ /index.php?$args;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/laravel.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
     location / {
         try_files $uri $uri/ /index.php?$query_string;
         location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/magento.tpl

@@ -13,7 +13,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     # PHP entry point for setup application
     location ~* ^/setup($|/) {

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/modx.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 #   if you need to rewrite www to non-www uncomment bellow
 #   if ($host != '%domain%' ) {
 #       rewrite      ^/(.*)$  http://%domain%/$1  permanent;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/moodle.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
 

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/no-php.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     types {
             text/html   html htm shtml php php5;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/odoo.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
     
     proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
     proxy_redirect          off;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/opencart.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
     location / {
         try_files $uri $uri/ @opencart;
         location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/owncloud.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location = /favicon.ico {
         log_not_found off;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/piwik.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location = /favicon.ico {
         try_files /favicon.ico =204;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/pyrocms.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location /installer {
             try_files $uri $uri/ /installer/index.php?$query_string;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/sendy.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
     location = /favicon.ico {
         log_not_found off;

+ 1 - 1
install/deb/templates/web/nginx/php-fpm/wordpress.tpl

@@ -7,7 +7,7 @@ server {
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
         
-    include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+    include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
     location = /favicon.ico {
         log_not_found off;
         access_log off;