Răsfoiți Sursa

Merge pull request #408 from hestiacp/release-1.0.1

Release 1.0.1
Raphael Schneeberger 6 ani în urmă
părinte
comite
e4420c145b
49 a modificat fișierele cu 357 adăugiri și 148 ștergeri
  1. 0 1
      bin/v-change-sys-release
  2. 75 0
      bin/v-change-web-domain-hsts
  3. 4 0
      install/deb/multiphp/nginx/PHP-56.stpl
  4. 4 0
      install/deb/multiphp/nginx/PHP-70.stpl
  5. 4 0
      install/deb/multiphp/nginx/PHP-71.stpl
  6. 4 0
      install/deb/multiphp/nginx/PHP-72.stpl
  7. 4 0
      install/deb/multiphp/nginx/PHP-73.stpl
  8. 0 2
      install/deb/nginx/nginx.conf
  9. 4 0
      install/deb/templates/web/nginx/caching.stpl
  10. 4 0
      install/deb/templates/web/nginx/default.stpl
  11. 4 0
      install/deb/templates/web/nginx/hosting.stpl
  12. 4 0
      install/deb/templates/web/nginx/php-fpm/cms_made_simple.stpl
  13. 4 0
      install/deb/templates/web/nginx/php-fpm/codeigniter2.stpl
  14. 4 0
      install/deb/templates/web/nginx/php-fpm/codeigniter3.stpl
  15. 4 0
      install/deb/templates/web/nginx/php-fpm/datalife_engine.stpl
  16. 4 0
      install/deb/templates/web/nginx/php-fpm/default.stpl
  17. 4 0
      install/deb/templates/web/nginx/php-fpm/dokuwiki.stpl
  18. 4 0
      install/deb/templates/web/nginx/php-fpm/drupal6.stpl
  19. 4 0
      install/deb/templates/web/nginx/php-fpm/drupal7.stpl
  20. 4 0
      install/deb/templates/web/nginx/php-fpm/drupal8.stpl
  21. 4 0
      install/deb/templates/web/nginx/php-fpm/joomla.stpl
  22. 4 1
      install/deb/templates/web/nginx/php-fpm/laravel.stpl
  23. 4 0
      install/deb/templates/web/nginx/php-fpm/magento.stpl
  24. 5 0
      install/deb/templates/web/nginx/php-fpm/modx.stpl
  25. 4 0
      install/deb/templates/web/nginx/php-fpm/moodle.stpl
  26. 4 0
      install/deb/templates/web/nginx/php-fpm/no-php.stpl
  27. 4 0
      install/deb/templates/web/nginx/php-fpm/odoo.stpl
  28. 4 0
      install/deb/templates/web/nginx/php-fpm/opencart.stpl
  29. 4 0
      install/deb/templates/web/nginx/php-fpm/owncloud.stpl
  30. 4 0
      install/deb/templates/web/nginx/php-fpm/piwik.stpl
  31. 4 0
      install/deb/templates/web/nginx/php-fpm/pyrocms.stpl
  32. 4 0
      install/deb/templates/web/nginx/php-fpm/sendy.stpl
  33. 4 0
      install/deb/templates/web/nginx/php-fpm/wordpress.stpl
  34. 3 3
      install/hst-install-debian.sh
  35. 4 4
      install/hst-install-ubuntu.sh
  36. 1 1
      install/upgrade/messages.sh
  37. 14 0
      install/upgrade/restart.sh
  38. 11 1
      install/upgrade/version.sh
  39. 72 0
      install/upgrade/versions/1.0.1.sh
  40. 0 69
      install/upgrade/versions/1.00.0-190618.sh
  41. 0 28
      install/upgrade/versions/1.00.0-190621.sh
  42. 1 1
      src/deb/hestia/control
  43. 5 0
      src/deb/hestia/postinst
  44. 2 1
      web/css/styles.min.css
  45. 7 2
      web/edit/package/index.php
  46. 3 3
      web/js/app.js
  47. 34 29
      web/templates/admin/list_backup_detail.html
  48. 2 1
      web/templates/admin/list_stats.html
  49. 2 1
      web/templates/user/list_stats.html

+ 0 - 1
bin/v-change-sys-release

@@ -28,7 +28,6 @@ if [ -z "$branch" ]; then
     echo ""
     echo ""
     echo "Common release branches:"
     echo "Common release branches:"
     echo "(*) master:   Stable releases only"
     echo "(*) master:   Stable releases only"
-    echo "(*) beta:     Beta builds which are being prepared for release"
     echo "(*) develop:  Daily development builds"
     echo "(*) develop:  Daily development builds"
     echo ""
     echo ""
     echo "You can also specify another branch name from the"
     echo "You can also specify another branch name from the"

+ 75 - 0
bin/v-change-web-domain-hsts

@@ -0,0 +1,75 @@
+#!/bin/bash
+# info: add/remove HSTS support from a domain
+# options: USER DOMAIN STATUS
+#
+# This function will enable or disable HSTS (HTTP Strict Transport Security)
+# for a web domain.
+
+
+#----------------------------------------------------------#
+#                    Variable&Function                     #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+domain=$2
+domain_idn=$2
+status=$3
+
+# Includes
+source $HESTIA/func/main.sh
+source $HESTIA/func/domain.sh
+source $HESTIA/conf/hestia.conf
+
+#----------------------------------------------------------#
+#                    Verifications                         #
+#----------------------------------------------------------#
+
+check_args '2' "$#" 'USER DOMAIN'
+is_format_valid 'user' 'domain'
+is_object_valid 'user' 'USER' "$user"
+is_object_unsuspended 'user' 'USER' "$user"
+is_object_valid 'web' 'DOMAIN' "$domain"
+is_object_unsuspended 'web' 'DOMAIN' "$domain"
+
+#----------------------------------------------------------#
+#                       Action                             #
+#----------------------------------------------------------#
+
+# Load domain data
+eval $(grep "DOMAIN='$domain'" $USER_DATA/web.conf)
+
+# Check if SSL is enabled
+if [ "$SSL" != 'yes' ]; then
+    echo "Error: SSL is not enabled"
+    exit $E_NOTEXIST
+fi
+
+# Check for Apache/Nginx or Nginx/PHP-FPM configuration
+if [ -z $PROXY_SYSTEM ]; then
+    hstsconf="$HOMEDIR/$user/conf/web/$domain/$WEB_SYSTEM.hsts.conf"
+else
+    hstsconf="$HOMEDIR/$user/conf/web/$domain/$PROXY_SYSTEM.hsts.conf"
+fi
+
+if [ "$status" = "on" ]; then
+    echo 'add_header Strict-Transport-Security "max-age=15768000;" always;' > $hstsconf
+    echo "HTTP Strict Transport Security (HSTS) turned on for $domain."
+elif [ "$status" = "off" ]; then
+    rm -f $hstsconf
+    nginx -s reload
+    echo "HTTP Strict Transport Security (HSTS) turned off for $domain."
+else
+    echo "Error: Invalid mode specified."
+    echo "Usage: v-change-web-domain-hsts USER DOMAIN [ON / OFF]"
+fi
+
+#----------------------------------------------------------#
+#                       Hestia                             #
+#----------------------------------------------------------#
+
+# Logging
+log_history "Enabled HTTP Strict Transport Security on $domain."
+log_event "$OK" "$ARGUMENTS"
+
+exit

+ 4 - 0
install/deb/multiphp/nginx/PHP-56.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
 
 

+ 4 - 0
install/deb/multiphp/nginx/PHP-70.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
 
 

+ 4 - 0
install/deb/multiphp/nginx/PHP-71.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
 
 

+ 4 - 0
install/deb/multiphp/nginx/PHP-72.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
 
 

+ 4 - 0
install/deb/multiphp/nginx/PHP-73.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
 
 

+ 0 - 2
install/deb/nginx/nginx.conf

@@ -112,8 +112,6 @@ http {
     ssl_dhparam         /etc/ssl/dhparam.pem;
     ssl_dhparam         /etc/ssl/dhparam.pem;
     ssl_ecdh_curve      secp384r1;
     ssl_ecdh_curve      secp384r1;
     ssl_session_tickets off;
     ssl_session_tickets off;
-    ssl_stapling        on;
-    ssl_stapling_verify on;
     resolver 1.0.0.1 1.1.1.1 valid=300s ipv6=off;
     resolver 1.0.0.1 1.1.1.1 valid=300s ipv6=off;
     resolver_timeout    5s;
     resolver_timeout    5s;
 
 

+ 4 - 0
install/deb/templates/web/nginx/caching.stpl

@@ -3,8 +3,12 @@ server {
     server_name %domain_idn% %alias_idn%;
     server_name %domain_idn% %alias_idn%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
     error_log  /var/log/%web_system%/domains/%domain%.error.log error;
     error_log  /var/log/%web_system%/domains/%domain%.error.log error;
 
 
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
+
     location / {
     location / {
         proxy_pass      https://%ip%:%web_ssl_port%;
         proxy_pass      https://%ip%:%web_ssl_port%;
 
 

+ 4 - 0
install/deb/templates/web/nginx/default.stpl

@@ -3,8 +3,12 @@ server {
     server_name %domain_idn% %alias_idn%;
     server_name %domain_idn% %alias_idn%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
     error_log  /var/log/%web_system%/domains/%domain%.error.log error;
     error_log  /var/log/%web_system%/domains/%domain%.error.log error;
 
 
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
+
     location / {
     location / {
         proxy_pass      https://%ip%:%web_ssl_port%;
         proxy_pass      https://%ip%:%web_ssl_port%;
         location ~* ^.+\.(%proxy_extentions%)$ {
         location ~* ^.+\.(%proxy_extentions%)$ {

+ 4 - 0
install/deb/templates/web/nginx/hosting.stpl

@@ -3,8 +3,12 @@ server {
     server_name %domain_idn% %alias_idn%;
     server_name %domain_idn% %alias_idn%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
     error_log  /var/log/%web_system%/domains/%domain%.error.log error;
     error_log  /var/log/%web_system%/domains/%domain%.error.log error;
 
 
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
+
     location / {
     location / {
         proxy_pass      https://%ip%:%web_ssl_port%;
         proxy_pass      https://%ip%:%web_ssl_port%;
         location ~* ^.+\.(%proxy_extentions%)$ {
         location ~* ^.+\.(%proxy_extentions%)$ {

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/cms_made_simple.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
         try_files $uri $uri/ /index.php?page=$request_uri;
         try_files $uri $uri/ /index.php?page=$request_uri;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/codeigniter2.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
         try_files $uri $uri/ /index.php;
         try_files $uri $uri/ /index.php;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/codeigniter3.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
         try_files $uri $uri/ /index.php;
         try_files $uri $uri/ /index.php;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/datalife_engine.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
         rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
         rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/default.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
 
 

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/dokuwiki.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
         index doku.php;
         index doku.php;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/drupal6.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location = /favicon.ico {
     location = /favicon.ico {
         log_not_found off;
         log_not_found off;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/drupal7.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location = /favicon.ico {
     location = /favicon.ico {
         log_not_found off;
         log_not_found off;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/drupal8.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location = /favicon.ico {
     location = /favicon.ico {
         log_not_found off;
         log_not_found off;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/joomla.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
         try_files $uri $uri/ /index.php?$args;
         try_files $uri $uri/ /index.php?$args;

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

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

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/magento.stpl

@@ -11,6 +11,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     access_log  /var/log/nginx/domains/%domain%.log combined;
     access_log  /var/log/nginx/domains/%domain%.log combined;
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;

+ 5 - 0
install/deb/templates/web/nginx/php-fpm/modx.stpl

@@ -9,6 +9,11 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
+
 #   if you need to rewrite www to non-www uncomment bellow
 #   if you need to rewrite www to non-www uncomment bellow
 #   if ($host != '%domain%' ) {
 #   if ($host != '%domain%' ) {
 #       rewrite      ^/(.*)$  https://%domain%/$1  permanent;
 #       rewrite      ^/(.*)$  https://%domain%/$1  permanent;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/moodle.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
     rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
 
 

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/no-php.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     types {
     types {
             text/html   html htm shtml php php5;
             text/html   html htm shtml php php5;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/odoo.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
     proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
     proxy_redirect          off;
     proxy_redirect          off;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/opencart.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location / {
     location / {
         try_files $uri $uri/ @opencart;
         try_files $uri $uri/ @opencart;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/owncloud.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location = /favicon.ico {
     location = /favicon.ico {
         log_not_found off;
         log_not_found off;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/piwik.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location = /favicon.ico {
     location = /favicon.ico {
         try_files /favicon.ico =204;
         try_files /favicon.ico =204;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/pyrocms.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location /installer {
     location /installer {
             try_files $uri $uri/ /installer/index.php?$query_string;
             try_files $uri $uri/ /installer/index.php?$query_string;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/sendy.stpl

@@ -3,12 +3,16 @@ server {
     server_name %domain_idn% %alias_idn%;
     server_name %domain_idn% %alias_idn%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
     root        %docroot%;
     root        %docroot%;
     index       index.php index.html index.htm;
     index       index.php index.html index.htm;
     access_log  /var/log/nginx/domains/%domain%.log combined;
     access_log  /var/log/nginx/domains/%domain%.log combined;
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
     error_log   /var/log/nginx/domains/%domain%.error.log error;
 
 
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
+
      location = /favicon.ico {
      location = /favicon.ico {
         log_not_found off;
         log_not_found off;
         access_log off;
         access_log off;

+ 4 - 0
install/deb/templates/web/nginx/php-fpm/wordpress.stpl

@@ -9,6 +9,10 @@ server {
 
 
     ssl_certificate      %ssl_pem%;
     ssl_certificate      %ssl_pem%;
     ssl_certificate_key  %ssl_key%;
     ssl_certificate_key  %ssl_key%;
+    ssl_stapling on;
+    ssl_stapling_verify on;
+
+    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
 
     location = /favicon.ico {
     location = /favicon.ico {
         log_not_found off;
         log_not_found off;

+ 3 - 3
install/hst-install-debian.sh

@@ -588,7 +588,7 @@ APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/php_signing.key > /dev/n
 
 
 # Installing MariaDB repo
 # Installing MariaDB repo
 echo "(*) MariaDB"
 echo "(*) MariaDB"
-echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.3/$VERSION $codename main" > $apt/mariadb.list
+echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.4/$VERSION $codename main" > $apt/mariadb.list
 if [ "$release" -eq 8 ]; then
 if [ "$release" -eq 8 ]; then
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CBCB082A1BB943DB > /dev/null 2>&1
     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CBCB082A1BB943DB > /dev/null 2>&1
 else
 else
@@ -1067,8 +1067,8 @@ echo "BACKUP_SYSTEM='local'" >> $HESTIA/conf/hestia.conf
 echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
 echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
 
 
 # Version & Release Branch
 # Version & Release Branch
-echo "VERSION='1.00.0-190618'" >> $HESTIA/conf/hestia.conf
-echo "RELEASE_BRANCH='develop'" >> $HESTIA/conf/hestia.conf
+echo "VERSION='1.0.1'" >> $HESTIA/conf/hestia.conf
+echo "RELEASE_BRANCH='master'" >> $HESTIA/conf/hestia.conf
 
 
 # Installing hosting packages
 # Installing hosting packages
 cp -rf $hestiacp/packages $HESTIA/data/
 cp -rf $hestiacp/packages $HESTIA/data/

+ 4 - 4
install/hst-install-ubuntu.sh

@@ -564,7 +564,7 @@ LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
 
 
 # Installing MariaDB repo
 # Installing MariaDB repo
 echo "(*) MariaDB"
 echo "(*) MariaDB"
-echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.3/$VERSION $codename main" > $apt/mariadb.list
+echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.4/$VERSION $codename main" > $apt/mariadb.list
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
 
 
 # Installing hestia repo
 # Installing hestia repo
@@ -1032,8 +1032,8 @@ echo "BACKUP_SYSTEM='local'" >> $HESTIA/conf/hestia.conf
 echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
 echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
 
 
 # Version & Release Branch
 # Version & Release Branch
-echo "VERSION='1.00.0-190618'" >> $HESTIA/conf/hestia.conf
-echo "RELEASE_BRANCH='develop'" >> $HESTIA/conf/hestia.conf
+echo "VERSION='1.0.1'" >> $HESTIA/conf/hestia.conf
+echo "RELEASE_BRANCH='master'" >> $HESTIA/conf/hestia.conf
 
 
 # Installing hosting packages
 # Installing hosting packages
 cp -rf $hestiacp/packages $HESTIA/data/
 cp -rf $hestiacp/packages $HESTIA/data/
@@ -1296,7 +1296,7 @@ fi
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
-#                    Configure phpMyAdmin                     #
+#                    Configure phpMyAdmin                  #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$mysql" = 'yes' ]; then
 if [ "$mysql" = 'yes' ]; then

+ 1 - 1
install/upgrade/messages.sh

@@ -8,7 +8,7 @@ function welcome_message() {
     echo '    |_| |_|\___||___/\__|_|\__,_|\____|_|          '
     echo '    |_| |_|\___||___/\__|_|\__,_|\____|_|          '
     echo ""
     echo ""
     echo "       Hestia Control Panel Upgrade Script"
     echo "       Hestia Control Panel Upgrade Script"
-    echo "             Version: $version                     "
+    echo "                 Version: $version                 "
     echo "==================================================="
     echo "==================================================="
     echo ""
     echo ""
     echo "Existing files will be backed up to the following location:"
     echo "Existing files will be backed up to the following location:"

+ 14 - 0
install/upgrade/restart.sh

@@ -1,5 +1,19 @@
 #!/bin/bash
 #!/bin/bash
 
 
+# Rebuild users and domains
+for user in `ls /usr/local/hestia/data/users/`; do
+    echo "(*) Rebuilding domains and account for user: $user..."
+    if [ ! -z $WEB_SYSTEM ]; then
+		$BIN/v-rebuild-web-domains $user >/dev/null 2>&1
+	fi
+    if [ ! -z $DNS_SYSTEM ]; then
+		$BIN/v-rebuild-dns-domains $user >/dev/null 2>&1
+    fi
+	if [ ! -z $MAIL_SYSTEM ]; then 
+		$BIN/v-rebuild-mail-domains $user >/dev/null 2>&1
+	fi
+done
+
 echo "(*) Restarting services..."
 echo "(*) Restarting services..."
 sleep 3
 sleep 3
 if [ ! -z $MAIL_SYSTEM ]; then
 if [ ! -z $MAIL_SYSTEM ]; then

+ 11 - 1
install/upgrade/version.sh

@@ -1,5 +1,15 @@
 #!/bin/bash
 #!/bin/bash
 
 
+# Add release branch system configuration if non-existent
+release_branch_check=$(cat $HESTIA/conf/hestia.conf | grep RELEASE_BRANCH)
+if [ -z "$release_branch_check" ]; then
+    echo "(*) Adding global release branch variable to system configuration..."
+    sed -i "/RELEASE_BRANCH/d" $HESTIA/conf/hestia.conf
+    echo "RELEASE_BRANCH='master'" >> $HESTIA/conf/hestia.conf
+fi
+
+# Step through version upgrade scripts in order as necessary to ensure that systems
+# are properly upgraded if skipping versions.
 if [ $VERSION = "$version" ]; then
 if [ $VERSION = "$version" ]; then
     echo "(!) The latest version of Hestia Control Panel ($version) is already installed."
     echo "(!) The latest version of Hestia Control Panel ($version) is already installed."
     echo "    Verifying configuration..."
     echo "    Verifying configuration..."
@@ -15,7 +25,7 @@ if [ $VERSION = "0.9.8-28" ]; then
     source /usr/local/hestia/install/upgrade/versions/1.00.0-190618.sh
     source /usr/local/hestia/install/upgrade/versions/1.00.0-190618.sh
     VERSION="1.00.0-190618"
     VERSION="1.00.0-190618"
 fi
 fi
-if [ $VERSION = "0.10.00" ] || [ $VERSION = "1.00.0-190618" ]; then
+if [ $VERSION = "0.10.00" ] || [ $VERSION = "1.00.0-190618" ] || [ $VERSION = "1.00.0-190621" ]; then
     source /usr/local/hestia/install/upgrade/versions/$version.sh
     source /usr/local/hestia/install/upgrade/versions/$version.sh
     VERSION="$version"
     VERSION="$version"
 fi
 fi

+ 72 - 0
install/upgrade/versions/1.0.1.sh

@@ -0,0 +1,72 @@
+#!/bin/bash
+
+# Define version check function
+function version_ge(){ test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" -o ! -z "$1" -a "$1" = "$2"; }
+
+# Set new version number
+NEW_VERSION="1.0.1"
+
+# Set phpMyAdmin version for upgrade
+pma_v='4.9.0.1'
+
+# Set backup folder
+HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
+
+# Set installation source folder
+hestiacp="$HESTIA/install/deb"
+
+# Load hestia.conf
+source /usr/local/hestia/conf/hestia.conf
+
+####### Place additional commands below. #######
+
+# Back up old template files and install the latest versions
+if [ -d $HESTIA/data/templates/ ]; then
+    cp -rf $HESTIA/data/templates $HESTIA_BACKUP/templates/
+    $HESTIA/bin/v-update-web-templates
+    $HESTIA/bin/v-update-dns-templates
+	$HESTIA/bin/v-update-mail-templates
+fi
+
+# Update Apache and Nginx configuration to support new file structure
+echo "(*) Updating web server configuration..."
+if [ -f /etc/apache2/apache.conf ]; then
+    mv  /etc/apache2/apache.conf $HESTIA_BACKUP/conf/
+    cp -f $HESTIA/install/deb/apache2/apache.conf /etc/apache2/apache.conf
+fi
+if [ -f /etc/nginx/nginx.conf ]; then
+    mv  /etc/nginx/nginx.conf $HESTIA_BACKUP/conf/
+    cp -f $HESTIA/install/deb/nginx/nginx.conf /etc/nginx/nginx.conf
+fi
+
+# Generate dhparam
+if [ ! -e /etc/ssl/dhparam.pem ]; then
+    mv  /etc/nginx/nginx.conf $HESTIA_BACKUP/conf/
+    cp -f $hestiacp/nginx/nginx.conf /etc/nginx/
+
+    # Copy dhparam
+    cp -f $hestiacp/ssl/dhparam.pem /etc/ssl/
+
+    # Update DNS servers in nginx.conf
+    dns_resolver=$(cat /etc/resolv.conf | grep -i '^nameserver' | cut -d ' ' -f2 | tr '\r\n' ' ' | xargs)
+    for ip in $dns_resolver; do
+        if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+            resolver="$ip $resolver"
+        fi
+    done
+    if [ ! -z "$resolver" ]; then
+        sed -i "s/1.0.0.1 1.1.1.1/$resolver/g" /etc/nginx/nginx.conf
+    fi
+
+    # Remove global options from nginx.conf to prevent conflicts with other web packages
+    if [ -e /etc/nginx/nginx.conf ]; then
+        sed -i "/add_header          X-Frame-Options SAMEORIGIN;/d" /etc/nginx/nginx.conf
+        sed -i "/add_header          X-Content-Type-Options nosniff;/d" /etc/nginx/nginx.conf
+    fi
+
+    # Restart Nginx service
+    systemctl restart nginx >/dev/null 2>&1
+fi
+
+
+

+ 0 - 69
install/upgrade/versions/1.00.0-190618.sh

@@ -27,25 +27,12 @@ if [ ! -z "$imap_check" ]; then
     fi
     fi
 fi
 fi
 
 
-# Add release branch system configuration if non-existent
-release_branch_check=$(cat $HESTIA/conf/hestia.conf | grep RELEASE_BRANCH)
-if [ -z "$release_branch_check" ]; then
-    echo "(*) Adding global release branch variable to system configuration..."
-    sed -i "/RELEASE_BRANCH/d" $HESTIA/conf/hestia.conf
-    echo "RELEASE_BRANCH='develop'" >> $HESTIA/conf/hestia.conf
-fi
-
 # Load global variables
 # Load global variables
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
 
 
 # Load hestia main functions
 # Load hestia main functions
 source /usr/local/hestia/func/main.sh
 source /usr/local/hestia/func/main.sh
 
 
-# Initialize backup directory
-mkdir -p $HESTIA_BACKUP/conf/
-mkdir -p $HESTIA_BACKUP/packages/
-mkdir -p $HESTIA_BACKUP/templates/
-
 # Detect OS
 # Detect OS
 case $(head -n1 /etc/issue | cut -f 1 -d ' ') in
 case $(head -n1 /etc/issue | cut -f 1 -d ' ') in
     Debian)     os="debian" ;;
     Debian)     os="debian" ;;
@@ -66,40 +53,6 @@ if [ ! -f /etc/apt/apt.conf.d/80-retries ]; then
     echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries
     echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries
 fi
 fi
 
 
-# Update Apache and Nginx configuration to support new file structure
-echo "(*) Updating web server configuration..."
-if [ -f /etc/apache2/apache.conf ]; then
-    mv  /etc/apache2/apache.conf $HESTIA_BACKUP/conf/
-    cp -f $HESTIA/install/deb/apache2/apache.conf /etc/apache2/apache.conf
-fi
-if [ -f /etc/nginx/nginx.conf ]; then
-    mv  /etc/nginx/nginx.conf $HESTIA_BACKUP/conf/
-    cp -f $HESTIA/install/deb/nginx/nginx.conf /etc/nginx/nginx.conf
-fi
-
-# Generate dhparam
-if [ ! -e /etc/ssl/dhparam.pem ]; then
-    mv  /etc/nginx/nginx.conf $HESTIA_BACKUP/conf/
-    cp -f $hestiacp/nginx/nginx.conf /etc/nginx/
-
-    # Copy dhparam
-    cp -f $hestiacp/ssl/dhparam.pem /etc/ssl/
-
-    # Update DNS servers in nginx.conf
-    dns_resolver=$(cat /etc/resolv.conf | grep -i '^nameserver' | cut -d ' ' -f2 | tr '\r\n' ' ' | xargs)
-    for ip in $dns_resolver; do
-        if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
-            resolver="$ip $resolver"
-        fi
-    done
-    if [ ! -z "$resolver" ]; then
-        sed -i "s/1.0.0.1 1.1.1.1/$resolver/g" /etc/nginx/nginx.conf
-    fi
-
-    # Restart Nginx service
-    systemctl restart nginx >/dev/null 2>&1
-fi
-
 # Update default page templates
 # Update default page templates
 echo "(*) Replacing default templates and packages..."
 echo "(*) Replacing default templates and packages..."
 
 
@@ -108,14 +61,6 @@ if [ -d $HESTIA/data/packages/ ]; then
     cp -f $HESTIA/data/packages/default.pkg $HESTIA_BACKUP/packages/
     cp -f $HESTIA/data/packages/default.pkg $HESTIA_BACKUP/packages/
 fi
 fi
 
 
-# Back up old template files and install the latest versions
-if [ -d $HESTIA/data/templates/ ]; then
-    cp -rf $HESTIA/data/templates $HESTIA_BACKUP/templates/
-    $HESTIA/bin/v-update-web-templates
-    $HESTIA/bin/v-update-dns-templates
-	$HESTIA/bin/v-update-mail-templates
-fi
-
 # Remove old Office 365 template as there is a newer version with an updated name
 # Remove old Office 365 template as there is a newer version with an updated name
 if [ -f $HESTIA/data/templates/dns/o365.tpl ]; then
 if [ -f $HESTIA/data/templates/dns/o365.tpl ]; then
     rm -f $HESTIA/data/templates/dns/o365.tpl
     rm -f $HESTIA/data/templates/dns/o365.tpl
@@ -345,20 +290,6 @@ for user in `ls /usr/local/hestia/data/users/`; do
     sed -i "s/\sFORCESSL=''//g" $USER_DATA/web.conf
     sed -i "s/\sFORCESSL=''//g" $USER_DATA/web.conf
 done
 done
 
 
-# Rebuild user
-for user in `ls /usr/local/hestia/data/users/`; do
-    echo "(*) Rebuilding domains and account for user: $user..."
-    if [ ! -z $WEB_SYSTEM ]; then
-		v-rebuild-web-domains $user >/dev/null 2>&1
-	fi
-    if [ ! -z $DNS_SYSTEM ]; then
-		v-rebuild-dns-domains $user >/dev/null 2>&1
-    fi
-	if [ ! -z $MAIL_SYSTEM ]; then 
-		v-rebuild-mail-domains $user >/dev/null 2>&1
-	fi
-done
-
 # Reset backend port
 # Reset backend port
 if [ ! -z "$BACKEND_PORT" ]; then
 if [ ! -z "$BACKEND_PORT" ]; then
     /usr/local/hestia/bin/v-change-sys-port $BACKEND_PORT
     /usr/local/hestia/bin/v-change-sys-port $BACKEND_PORT

+ 0 - 28
install/upgrade/versions/1.00.0-190621.sh

@@ -1,28 +0,0 @@
-#!/bin/bash
-
-# Define version check function
-function version_ge(){ test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" -o ! -z "$1" -a "$1" = "$2"; }
-
-# Set new version number
-NEW_VERSION="1.00.0-190621"
-
-# Set phpMyAdmin version for upgrade
-pma_v='4.9.0.1'
-
-# Set backup folder
-HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
-
-# Set installation source folder
-hestiacp="$HESTIA/install/deb"
-
-# Load hestia.conf
-source /usr/local/hestia/conf/hestia.conf
-
-####### Place additional commands below. #######
-
-# Remove global options from nginx.conf to prevent conflicts with other web packages
-if [ -e /etc/nginx/nginx.conf ]; then
-    echo "(*) Updating nginx configuration.."
-    sed -i "/add_header          X-Frame-Options SAMEORIGIN;/d" /etc/nginx/nginx.conf
-    sed -i "/add_header          X-Content-Type-Options nosniff;/d" /etc/nginx/nginx.conf
-fi

+ 1 - 1
src/deb/hestia/control

@@ -1,7 +1,7 @@
 Source: hestia
 Source: hestia
 Package: hestia
 Package: hestia
 Priority: optional
 Priority: optional
-Version: 1.00.0-190621
+Version: 1.0.1
 Section: admin
 Section: admin
 Maintainer: HestiaCP <info@hestiacp.com>
 Maintainer: HestiaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com
 Homepage: https://www.hestiacp.com

+ 5 - 0
src/deb/hestia/postinst

@@ -17,6 +17,11 @@ fi
 # Set backup folder
 # Set backup folder
 HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
 HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
 
 
+# Initialize backup folders
+mkdir -p $HESTIA_BACKUP/conf/
+mkdir -p $HESTIA_BACKUP/packages/
+mkdir -p $HESTIA_BACKUP/templates/
+
 # Set installation source folder
 # Set installation source folder
 hestiacp="$HESTIA/install/deb"
 hestiacp="$HESTIA/install/deb"
 
 

+ 2 - 1
web/css/styles.min.css

@@ -1109,7 +1109,7 @@ a {
   position: fixed;
   position: fixed;
   background-color: #fff;
   background-color: #fff;
   z-index: 100;
   z-index: 100;
-  padding-top: 34px;
+  padding-top: 36px;
   overflow: hidden;
   overflow: hidden;
   text-align: center;
   text-align: center;
   display: flex;
   display: flex;
@@ -1223,6 +1223,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
   background-color: #fff;
   background-color: #fff;
   z-index: 120;
   z-index: 120;
   margin-top: 181px;
   margin-top: 181px;
+  height: 44px;
 }
 }
 
 
 .l-sort__create-btn {
 .l-sort__create-btn {

+ 7 - 2
web/edit/package/index.php

@@ -119,8 +119,13 @@ if (!empty($_POST['save'])) {
     if (!isset($_POST['v_backups'])) $errors[] = __('backups');
     if (!isset($_POST['v_backups'])) $errors[] = __('backups');
     if (!isset($_POST['v_disk_quota'])) $errors[] = __('quota');
     if (!isset($_POST['v_disk_quota'])) $errors[] = __('quota');
     if (!isset($_POST['v_bandwidth'])) $errors[] = __('bandwidth');
     if (!isset($_POST['v_bandwidth'])) $errors[] = __('bandwidth');
-    if (empty($_POST['v_ns1'])) $errors[] = __('ns1');
-    if (empty($_POST['v_ns2'])) $errors[] = __('ns2');
+
+    // Check if name server entries are blank if DNS server is installed
+    if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {
+        if (empty($_POST['v_ns1'])) $errors[] = __('ns1');
+        if (empty($_POST['v_ns2'])) $errors[] = __('ns2');
+    }
+
     if (!empty($errors[0])) {
     if (!empty($errors[0])) {
         foreach ($errors as $i => $error) {
         foreach ($errors as $i => $error) {
             if ( $i == 0 ) {
             if ( $i == 0 ) {

+ 3 - 3
web/js/app.js

@@ -1003,7 +1003,7 @@ hover_menu = function() {
     var st = $(window).scrollTop();
     var st = $(window).scrollTop();
 
 
     if (st <= 112) {
     if (st <= 112) {
-        sep_1.css({'margin-top': 178 - st + 'px'});
+        sep_1.css({'margin-top': 180 - st + 'px'});
         sep_2.css({'margin-top': 225 - st + 'px'});
         sep_2.css({'margin-top': 225 - st + 'px'});
         nav_a.css({'height': 111 - st + 'px'});
         nav_a.css({'height': 111 - st + 'px'});
         nav_a.css({'min-height': 111 - st + 'px'});
         nav_a.css({'min-height': 111 - st + 'px'});
@@ -1033,11 +1033,11 @@ hover_menu = function() {
 
 
     if(st < 109 ){
     if(st < 109 ){
         nav_a.find('ul').css({'visibility': 'visible'});
         nav_a.find('ul').css({'visibility': 'visible'});
-        nav_main.css({'padding-top': 34 + 'px'});
+        nav_main.css({'padding-top': 36 + 'px'});
     }
     }
 
 
     if (st <= 112 && st > 110 ) {
     if (st <= 112 && st > 110 ) {
-        nav_main.css({'padding-top': 34 - st + 109  + 'px'});
+        nav_main.css({'padding-top': 36 - st + 109  + 'px'});
     }
     }
 
 
     lastScrollTop = st;
     lastScrollTop = st;

+ 34 - 29
web/templates/admin/list_backup_detail.html

@@ -14,10 +14,6 @@
                   <button type="submit" class="l-sort-toolbar__filter-apply" onclick="return doSearch('/search/')" value=""><i class="fas fa-search"></i></button>
                   <button type="submit" class="l-sort-toolbar__filter-apply" onclick="return doSearch('/search/')" value=""><i class="fas fa-search"></i></button>
                 </form>
                 </form>
               </td>
               </td>
-              <td class="toggle-all">
-                <input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" onchange="checkedAll('objects');">
-                <label for="toggle-all" class="check-label toggle-all"><?=__('toggle all')?></label>
-              </td>
               <td>
               <td>
                 <form action="/bulk/restore/" method="post" id="objects">
                 <form action="/bulk/restore/" method="post" id="objects">
                 <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
                 <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
@@ -39,10 +35,19 @@
     <div class="l-separator"></div>
     <div class="l-separator"></div>
 
 
     <div class="l-center units animated fadeIn">
     <div class="l-center units animated fadeIn">
-    <div class="header">
-      <div class="subtitle"><?=__('Listing')?>  <?=htmlentities($_GET['backup'])?></div>
-    </div>
-
+      <div class="header table-header">
+          <div class="l-unit__col l-unit__col--right step-top">
+            <div>
+                <div class="clearfix l-unit__stat-col--left super-compact">
+                  <input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" onchange="checkedAll('objects');">
+                </div>
+                <div class="clearfix l-unit__stat-col--left compact-4"><b><?php print __('Type');?></b></div>
+                <div class="clearfix l-unit__stat-col--left wide-4"><b><?php print __('Details');?></b></div>
+                <div class="clearfix l-unit__stat-col--left text-right compact-4"><b><?php print __('Restore');?></b></div>
+            </div>
+           </div>
+        </div>
+      
       <?
       <?
         $backup = $_GET['backup'];
         $backup = $_GET['backup'];
         $web = explode(',',$data[$backup]['WEB']);
         $web = explode(',',$data[$backup]['WEB']);
@@ -58,10 +63,10 @@
               <label for="check<?=$i++?>" class="check-label"></label>
               <label for="check<?=$i++?>" class="check-label"></label>
             </div>
             </div>
 
 
-            <div class="clearfix l-unit__stat-col--left">
-                <div class="l-unit__stat-col l-unit__stat-col--left uppercase"><?='WEB ' . __('domain')?></div>
+            <div class="clearfix l-unit__stat-col--left compact-4">
+                <div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Web domain')?></div>
             </div>
             </div>
-            <div class="clearfix l-unit__stat-col--left wide-3">
+            <div class="clearfix l-unit__stat-col--left wide-4">
                 <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
                 <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
             </div>
             </div>
 
 
@@ -96,10 +101,10 @@
                   <label for="check2<?=$i++?>" class="check-label"></label>
                   <label for="check2<?=$i++?>" class="check-label"></label>
               </div>
               </div>
   
   
-              <div class="clearfix l-unit__stat-col--left">
-                  <div class="l-unit__stat-col l-unit__stat-col--left uppercase"><?='MAIL ' . __('domain')?></div>
+              <div class="clearfix l-unit__stat-col--left compact-4">
+                  <div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Mail domain')?></div>
               </div>
               </div>
-              <div class="clearfix l-unit__stat-col--left wide-3">
+              <div class="clearfix l-unit__stat-col--left wide-4">
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
               </div>
               </div>
   
   
@@ -134,10 +139,10 @@
                 <label for="check3<?=$i++?>" class="check-label"></label>
                 <label for="check3<?=$i++?>" class="check-label"></label>
               </div>
               </div>
   
   
-              <div class="clearfix l-unit__stat-col--left">
-                  <div class="l-unit__stat-col l-unit__stat-col--left uppercase"><?='DNS ' . __('domain')?></div>
+              <div class="clearfix l-unit__stat-col--left compact-4">
+                  <div class="l-unit__stat-col l-unit__stat-col--left"><?=__('DNS domain')?></div>
               </div>
               </div>
-              <div class="clearfix l-unit__stat-col--left wide-3">
+              <div class="clearfix l-unit__stat-col--left wide-4">
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
               </div>
               </div>
   
   
@@ -172,10 +177,10 @@
                 <label for="check4<?=$i++?>" class="check-label"></label>
                 <label for="check4<?=$i++?>" class="check-label"></label>
               </div>
               </div>
   
   
-              <div class="clearfix l-unit__stat-col--left">
-                  <div class="l-unit__stat-col l-unit__stat-col--left uppercase"><?=__('database')?></div>
+              <div class="clearfix l-unit__stat-col--left compact-4">
+                  <div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Database')?></div>
               </div>
               </div>
-              <div class="clearfix l-unit__stat-col--left wide-3">
+              <div class="clearfix l-unit__stat-col--left wide-4">
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
               </div>
               </div>
   
   
@@ -210,10 +215,10 @@
                 <label for="check5<?=$i++?>" class="check-label"></label>
                 <label for="check5<?=$i++?>" class="check-label"></label>
               </div>
               </div>
   
   
-              <div class="clearfix l-unit__stat-col--left">
-                  <div class="l-unit__stat-col l-unit__stat-col--left uppercase"><?=__('cron')?></div>
+              <div class="clearfix l-unit__stat-col--left compact-4">
+                  <div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Cron Records')?></div>
               </div>
               </div>
-              <div class="clearfix l-unit__stat-col--left wide-3">
+              <div class="clearfix l-unit__stat-col--left wide-4">
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?='cron '.__('records')?></b></div>
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?='cron '.__('records')?></b></div>
               </div>
               </div>
   
   
@@ -247,10 +252,10 @@
                 <label for="check6<?=$i++?>" class="check-label"></label>
                 <label for="check6<?=$i++?>" class="check-label"></label>
               </div>
               </div>
   
   
-              <div class="clearfix l-unit__stat-col--left">
-                  <div class="l-unit__stat-col l-unit__stat-col--left uppercase"><?=__('user dir')?></div>
+              <div class="clearfix l-unit__stat-col--left compact-4">
+                  <div class="l-unit__stat-col l-unit__stat-col--left"><?=__('user dir')?></div>
               </div>
               </div>
-              <div class="clearfix l-unit__stat-col--left wide-3">
+              <div class="clearfix l-unit__stat-col--left wide-4">
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b><?=$key?></b></div>
               </div>
               </div>
   
   
@@ -279,10 +284,10 @@
                 <label for="check7<?=$i++?>" class="check-label"></label>
                 <label for="check7<?=$i++?>" class="check-label"></label>
               </div>
               </div>
   
   
-              <div class="clearfix l-unit__stat-col--left">
-                  <div class="l-unit__stat-col l-unit__stat-col--left uppercase"><?=__('cron')?></div>
+              <div class="clearfix l-unit__stat-col--left compact-4">
+                  <div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Cron')?></div>
               </div>
               </div>
-              <div class="clearfix l-unit__stat-col--left wide-3">
+              <div class="clearfix l-unit__stat-col--left wide-4">
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b>&nbsp;</b></div>
                   <div class="l-unit__stat-col l-unit__stat-col--left wide-4"><b>&nbsp;</b></div>
               </div>
               </div>
   
   

+ 2 - 1
web/templates/admin/list_stats.html

@@ -50,7 +50,8 @@
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-mail-bulk" title="<?php print __('Mail Domains');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-mail-bulk" title="<?php print __('Mail Domains');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-inbox" title="<?php print __('Mail Accounts');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-inbox" title="<?php print __('Mail Accounts');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-database" title="<?php print __('Databases');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-database" title="<?php print __('Databases');?>"></i></b></div>
-            <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-clock" title="<?php print __('Backups');?>"></i></b></div>
+            <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-clock" title="<?php print __('Cron Jobs');?>"></i></b></div>
+            <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-undo" title="<?php print __('Backups');?>"></i></b></div>
          </div>
          </div>
         </div>
         </div>
       </div>
       </div>

+ 2 - 1
web/templates/user/list_stats.html

@@ -37,7 +37,8 @@
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-mail-bulk" title="<?php print __('Mail Domains');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-mail-bulk" title="<?php print __('Mail Domains');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-inbox" title="<?php print __('Mail Accounts');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-inbox" title="<?php print __('Mail Accounts');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-database" title="<?php print __('Databases');?>"></i></b></div>
             <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-database" title="<?php print __('Databases');?>"></i></b></div>
-            <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-clock" title="<?php print __('Backups');?>"></i></b></div>
+            <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-clock" title="<?php print __('Cron Jobs');?>"></i></b></div>
+            <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-undo" title="<?php print __('Backups');?>"></i></b></div>
          </div>
          </div>
         </div>
         </div>
       </div>
       </div>