Преглед изворни кода

Switch to mod_event for apache2 and drop Debian 8 support (EOL).

This commit resolves #839
Raphael Schneeberger пре 5 година
родитељ
комит
3c64056812
4 измењених фајлова са 82 додато и 63 уклоњено
  1. 7 5
      CHANGELOG.md
  2. 45 43
      install/hst-install-debian.sh
  3. 27 12
      install/hst-install-ubuntu.sh
  4. 3 3
      install/hst-install.sh

+ 7 - 5
CHANGELOG.md

@@ -9,7 +9,8 @@ All notable changes to this project will be documented in this file.
 - Added support for resolving ip addresses based on geoip database for Awstats
 - Added Roundcube plugins newmail_notifier and zipdownload.
 - Added HELO support for multiple domains and IPs.
-- Add the possibility to manage ssh keys in the backend.
+- Added the possibility to manage ssh keys in the backend.
+- Switched to mod_event instead mod_prefork for apache2.
 
 ### Bugfixes
 - Do not allow to show apache2 server-status page from public.
@@ -33,10 +34,11 @@ All notable changes to this project will be documented in this file.
 - Stop trying to renew LE certs after multiple consecutive failed attempts. Thanks to @dpeca!
 - Implement a validation function to verify the correct version in hestia.conf prior to install a new one.
 - Fix autologout issue on cloudflare proxy and rearange 2FA authentification part. Thanks to @rmj-s!
-- Roundcube fixes for PHP 7.4 compatibility.
-- Added delay when entering wrong username/password/2fa
-- Improved "Forgot password" function prevent brute forcing
-- Update Backup counter propperly when v-delete-user-backup ran
+- Roundcube fixes for PHP 7.4 compatibility..
+- Added delay when entering wrong username/password/2fa.
+- Improved "Forgot password" function prevent brute forcing.
+- Update Backup counter propperly when v-delete-user-backup ran.
+- Dropped support for Debian 8 according to EOL.
 
 ## [1.1.1] - 2020-03-24 - Hotfix
 ### Features

+ 45 - 43
install/hst-install-debian.sh

@@ -29,51 +29,39 @@ multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4")
 fpm_v="7.3"
 mariadb_v="10.4"
 
-if [ "$release" -eq 8 ]; then
-    software="nginx apache2 apache2-utils apache2.2-common
-        apache2-suexec-custom libapache2-mod-ruid2
-        libapache2-mod-fcgid libapache2-mod-php5 php5 php5-common php5-cgi
-        php5-mysql php5-curl php5-pgsql awstats vsftpd net-tools
-        php5-imagick proftpd-basic bind9 exim4 exim4-daemon-heavy clamav-daemon
-        spamassassin dovecot-imapd dovecot-pop3d roundcube-core
-        roundcube-mysql roundcube-plugins mariadb-client mariadb-common
-        mariadb-server postgresql postgresql-contrib phppgadmin phpMyAdmin mc
-        flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
-        e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
-        bsdmainutils cron hestia hestia-nginx hestia-php expect libmail-dkim-perl
-        unrar-free vim-common acl sysstat setpriv ipset"
-elif [ "$release" -eq 9 ]; then
+if [ "$release" -eq 9 ]; then
+    software="nginx apache2 apache2-utils apache2-suexec-custom
+        libapache2-mod-fcgid libapache2-mod-php$fpm_v php$fpm_v php$fpm_v-common
+        php$fpm_v-cgi php$fpm_v-mysql php$fpm_v-curl php$fpm_v-pgsql
+        php$fpm_v-imagick php$fpm_v-imap php$fpm_v-ldap php$fpm_v-apcu awstats
+        php$fpm_v-zip php$fpm_v-bz2 php$fpm_v-cli php$fpm_v-gd php$fpm_v-intl
+        php$fpm_v-json php$fpm_v-mbstring php$fpm_v-opcache php$fpm_v-pspell
+        php$fpm_v-readline php$fpm_v-xml vsftpd proftpd-basic bind9 exim4
+        exim4-daemon-heavy clamav-daemon spamassassin dovecot-imapd
+        dovecot-pop3d roundcube-core net-tools roundcube-mysql roundcube-plugins
+        mariadb-client mariadb-common mariadb-server postgresql
+        postgresql-contrib phppgadmin phpmyadmin mc flex whois rssh git idn zip
+        sudo bc ftp lsof ntpdate rrdtool quota e2fslibs bsdutils e2fsprogs curl
+        imagemagick fail2ban dnsutils bsdmainutils cron hestia hestia-nginx
+        hestia-php expect libmail-dkim-perl unrar-free vim-common acl sysstat
+        rsyslog setpriv ipset libapache2-mod-ruid2"
+elif [ "$release" -eq 10 ]; then
     software="nginx apache2 apache2-utils apache2-suexec-custom
-        libapache2-mod-ruid2 libapache2-mod-fcgid libapache2-mod-php$fpm_v 
+        apache2-suexec-pristine libapache2-mod-fcgid libapache2-mod-php$fpm_v
         php$fpm_v php$fpm_v-common php$fpm_v-cgi php$fpm_v-mysql php$fpm_v-curl
         php$fpm_v-pgsql php$fpm_v-imagick php$fpm_v-imap php$fpm_v-ldap
         php$fpm_v-apcu awstats php$fpm_v-zip php$fpm_v-bz2 php$fpm_v-cli
         php$fpm_v-gd php$fpm_v-intl php$fpm_v-json php$fpm_v-mbstring
         php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline php$fpm_v-xml
-        vsftpd proftpd-basic bind9 exim4 exim4-daemon-heavy clamav-daemon
-        spamassassin dovecot-imapd dovecot-pop3d roundcube-core net-tools
-        roundcube-mysql roundcube-plugins mariadb-client mariadb-common
-        mariadb-server postgresql postgresql-contrib phppgadmin phpmyadmin mc
-        flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
-        e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
-        bsdmainutils cron hestia hestia-nginx hestia-php expect libmail-dkim-perl
-        unrar-free vim-common acl sysstat rsyslog setpriv ipset"
-elif [ "$release" -eq 10 ]; then
-    software="nginx apache2 apache2-utils apache2-suexec-custom
-        apache2-suexec-pristine libapache2-mod-fcgid libapache2-mpm-itk 
-        libapache2-mod-php$fpm_v php$fpm_v php$fpm_v-common php$fpm_v-cgi
-        php$fpm_v-mysql php$fpm_v-curl php$fpm_v-pgsql php$fpm_v-imagick 
-        php$fpm_v-imap php$fpm_v-ldap php$fpm_v-apcu awstats php$fpm_v-zip
-        php$fpm_v-bz2 php$fpm_v-cli php$fpm_v-gd php$fpm_v-intl php$fpm_v-json
-        php$fpm_v-mbstring php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline
-        php$fpm_v-xml awstats vsftpd proftpd-basic bind9 exim4 exim4-daemon-heavy 
+        awstats vsftpd proftpd-basic bind9 exim4 exim4-daemon-heavy
         clamav-daemon spamassassin dovecot-imapd dovecot-pop3d roundcube-core
-        net-tools roundcube-mysql roundcube-plugins mariadb-client mariadb-common
-        mariadb-server postgresql postgresql-contrib phpmyadmin phppgadmin mc
-        flex whois git idn zip sudo bc ftp lsof ntpdate rrdtool quota e2fslibs
-        bsdutils e2fsprogs curl imagemagick fail2ban dnsutils bsdmainutils cron
-        hestia hestia-nginx hestia-php expect libmail-dkim-perl unrar-free
-        vim-common acl sysstat rsyslog util-linux ipset"
+        net-tools roundcube-mysql roundcube-plugins mariadb-client
+        mariadb-common mariadb-server postgresql postgresql-contrib phpmyadmin
+        phppgadmin mc flex whois git idn zip sudo bc ftp lsof ntpdate rrdtool
+        quota e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
+        bsdmainutils cron hestia hestia-nginx hestia-php expect
+        libmail-dkim-perl unrar-free vim-common acl sysstat rsyslog util-linux
+        ipset libapache2-mpm-itk"
 fi
 
 # Defining help function
@@ -770,11 +758,9 @@ if [ "$apache" = 'no' ]; then
     software=$(echo "$software" | sed -e "s/apache2-utils//")
     software=$(echo "$software" | sed -e "s/apache2-suexec-custom//")
     software=$(echo "$software" | sed -e "s/apache2.2-common//")
-    software=$(echo "$software" | sed -e "s/libapache2-mod-ruid2//")
     software=$(echo "$software" | sed -e "s/libapache2-mod-rpaf//")
     software=$(echo "$software" | sed -e "s/libapache2-mod-fcgid//")
     software=$(echo "$software" | sed -e "s/libapache2-mod-php$fpm_v//")
-    software=$(echo "$software" | sed -e "s/libapache2-mpm-itk//")
 fi
 if [ "$vsftpd" = 'no' ]; then
     software=$(echo "$software" | sed -e "s/vsftpd//")
@@ -830,6 +816,9 @@ fi
 if [ "$phpfpm" = 'yes' ]; then
     software=$(echo "$software" | sed -e "s/php$fpm_v-cgi//")
     software=$(echo "$software" | sed -e "s/libapache2-mpm-itk//")
+    software=$(echo "$software" | sed -e "s/libapache2-mod-ruid2//")
+    software=$(echo "$software" | sed -e "s/libapache2-mod-php$fpm_v//")
+
 fi
 if [ -d "$withdebs" ]; then
     software=$(echo "$software" | sed -e "s/hestia-nginx//")
@@ -1201,18 +1190,31 @@ fi
 
 if [ "$apache" = 'yes' ]; then
     echo "(*) Configuring Apache Web Server..."
+    
+    # Copy configuration files
     cp -f $HESTIA_INSTALL_DIR/apache2/apache2.conf /etc/apache2/
     cp -f $HESTIA_INSTALL_DIR/apache2/status.conf /etc/apache2/mods-enabled/
     cp -f $HESTIA_INSTALL_DIR/logrotate/apache2 /etc/logrotate.d/
+    
+    # Enable needed modules
     a2enmod rewrite > /dev/null 2>&1
     a2enmod suexec > /dev/null 2>&1
     a2enmod ssl > /dev/null 2>&1
     a2enmod actions > /dev/null 2>&1
-    if [ "$release" -eq 10 ]; then
-        a2enmod mpm_itk > /dev/null 2>&1
+
+    if [ "$phpfpm" = 'yes' ]; then
+        # Disable prefork and php, enable event
+        a2dismod php$fpm_v > /dev/null 2>&1
+        a2dismod mpm_prefork > /dev/null 2>&1
+        a2enmod mpm_event > /dev/null 2>&1
     else
-        a2enmod ruid2 > /dev/null 2>&1
+        if [ "$release" -eq 10 ]; then
+            a2enmod mpm_itk > /dev/null 2>&1
+        else
+            a2enmod ruid2 > /dev/null 2>&1
+        fi
     fi
+
     mkdir -p /etc/apache2/conf.d
     mkdir -p /etc/apache2/conf.d/domains
     echo "# Powered by hestia" > /etc/apache2/sites-available/default

+ 27 - 12
install/hst-install-ubuntu.sh

@@ -35,16 +35,16 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
     cron curl dnsutils dovecot-imapd dovecot-pop3d e2fslibs e2fsprogs exim4
     exim4-daemon-heavy expect fail2ban flex ftp git idn imagemagick
     libapache2-mod-fcgid libapache2-mod-php$fpm_v libapache2-mod-rpaf
-    libapache2-mod-ruid2 lsof mc mariadb-client mariadb-common mariadb-server
-    nginx ntpdate php$fpm_v php$fpm_v-cgi php$fpm_v-common php$fpm_v-curl
-    phpmyadmin php$fpm_v-mysql php$fpm_v-imap php$fpm_v-ldap php$fpm_v-apcu
-    phppgadmin php$fpm_v-pgsql php$fpm_v-zip php$fpm_v-bz2 php$fpm_v-cli
-    php$fpm_v-gd php$fpm_v-imagick php$fpm_v-intl php$fpm_v-json
-    php$fpm_v-mbstring php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline
-    php$fpm_v-xml postgresql postgresql-contrib proftpd-basic quota
-    roundcube-core roundcube-mysql roundcube-plugins rrdtool rssh spamassassin
-    sudo hestia hestia-nginx hestia-php vim-common vsftpd whois zip acl sysstat
-    setpriv libonig5 ipset"
+    lsof mc mariadb-client mariadb-common mariadb-server nginx ntpdate
+    php$fpm_v php$fpm_v-cgi php$fpm_v-common php$fpm_v-curl phpmyadmin
+    php$fpm_v-mysql php$fpm_v-imap php$fpm_v-ldap php$fpm_v-apcu phppgadmin
+    php$fpm_v-pgsql php$fpm_v-zip php$fpm_v-bz2 php$fpm_v-cli php$fpm_v-gd
+    php$fpm_v-imagick php$fpm_v-intl php$fpm_v-json php$fpm_v-mbstring
+    php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline php$fpm_v-xml
+    postgresql postgresql-contrib proftpd-basic quota roundcube-core
+    roundcube-mysql roundcube-plugins rrdtool rssh spamassassin sudo hestia
+    hestia-nginx hestia-php vim-common vsftpd whois zip acl sysstat setpriv
+    libonig5 ipset"
 
 # Defining help function
 help() {
@@ -722,7 +722,6 @@ if [ "$apache" = 'no' ]; then
     software=$(echo "$software" | sed -e "s/apache2-utils//")
     software=$(echo "$software" | sed -e "s/apache2-suexec-custom//")
     software=$(echo "$software" | sed -e "s/apache2.2-common//")
-    software=$(echo "$software" | sed -e "s/libapache2-mod-ruid2//")
     software=$(echo "$software" | sed -e "s/libapache2-mod-rpaf//")
     software=$(echo "$software" | sed -e "s/libapache2-mod-fcgid//")
     software=$(echo "$software" | sed -e "s/libapache2-mod-php$fpm_v//")
@@ -791,6 +790,8 @@ if [ "$iptables" = 'no' ] || [ "$fail2ban" = 'no' ]; then
 fi
 if [ "$phpfpm" = 'yes' ]; then
     software=$(echo "$software" | sed -e "s/php$fpm_v-cgi//")
+    software=$(echo "$software" | sed -e "s/libapache2-mod-ruid2//")
+    software=$(echo "$software" | sed -e "s/libapache2-mod-php$fpm_v//")
 fi
 if [ -d "$withdebs" ]; then
     software=$(echo "$software" | sed -e "s/hestia-nginx//")
@@ -1179,14 +1180,28 @@ fi
 
 if [ "$apache" = 'yes' ]; then
     echo "(*) Configuring Apache Web Server..."
+
+    # Copy configuration files
     cp -f $HESTIA_INSTALL_DIR/apache2/apache2.conf /etc/apache2/
     cp -f $HESTIA_INSTALL_DIR/apache2/status.conf /etc/apache2/mods-enabled/
     cp -f $HESTIA_INSTALL_DIR/logrotate/apache2 /etc/logrotate.d/
+    
+    # Enable needed modules
     a2enmod rewrite > /dev/null 2>&1
     a2enmod suexec > /dev/null 2>&1
     a2enmod ssl > /dev/null 2>&1
     a2enmod actions > /dev/null 2>&1
-    a2enmod ruid2 > /dev/null 2>&1
+
+    # Enable mod_ruid/mpm_itk or mpm_event
+    if [ "$phpfpm" = 'yes' ]; then
+        # Disable prefork and php, enable event
+        a2dismod php$fpm_v > /dev/null 2>&1
+        a2dismod mpm_prefork > /dev/null 2>&1
+        a2enmod mpm_event > /dev/null 2>&1
+    else
+        a2enmod ruid2 > /dev/null 2>&1
+    fi
+
     mkdir -p /etc/apache2/conf.d
     mkdir -p /etc/apache2/conf.d/domains
     echo "# Powered by hestia" > /etc/apache2/sites-available/default

+ 3 - 3
install/hst-install.sh

@@ -5,7 +5,7 @@
 #
 # Currently Supported Operating Systems:
 #
-#   Debian 8, 9, 10
+#   Debian 9, 10
 #   Ubuntu 16.04, 18.04, 20.04
 #
 
@@ -61,7 +61,7 @@ no_support_message(){
     echo "Your operating system (OS) is not supported by"
     echo "Hestia Control Panel. Officially supported releases:"
     echo "****************************************************"
-    echo "  Debian 8, 9, 10"
+    echo "  Debian 9, 10"
     echo "  Ubuntu 16.04 LTS, 18.04, 20.04 LTS"
     echo ""
     exit 1;
@@ -99,7 +99,7 @@ check_wget_curl(){
 
 # Check for supported operating system before proceeding with download
 # of OS-specific installer, and throw error message if unsupported OS detected.
-if [[ "$release" =~ ^(8|9|10|16.04|18.04|20.04)$ ]]; then
+if [[ "$release" =~ ^(9|10|16.04|18.04|20.04)$ ]]; then
     check_wget_curl $*
 else
     no_support_message