diff --git a/mod_php_install.sh b/mod_php_install.sh
index cebfe20..fa57a2e 100755
--- a/mod_php_install.sh
+++ b/mod_php_install.sh
@@ -3597,13 +3597,24 @@ if ! $WITHOUT_APACHE_MOD_PHP ; then
#fi
echononl "\tGoing to set \"LoadModule\" entries in httpd.conf .."
- sed -i -r \
- -e "s&(^\s*LoadModule php${PHP_MAJOR_VERSION}_module.*$)&\1\n\n AddType application/x-httpd-php .php\n AddType application/x-httpd-php-source .phps\n&" ${APACHE_BASEDIR}/conf/httpd.conf
- if [ "$?" = "0" ]; then
- echo_ok
+ if [[ ${PHP_MAJOR_VERSION} -lt 8 ]] ; then
+ sed -i -r \
+ -e "s&(^\s*LoadModule php${PHP_MAJOR_VERSION}_module.*$)&\1\n\n AddType application/x-httpd-php .php\n AddType application/x-httpd-php-source .phps\n&" ${APACHE_BASEDIR}/conf/httpd.conf
+ if [ "$?" = "0" ]; then
+ echo_ok
+ else
+ echo_failed
+ fi
else
- echo_failed
+ sed -i -r \
+ -e "s&(^\s*LoadModule php_module.*$)&\1\n\n AddType application/x-httpd-php .php\n AddType application/x-httpd-php-source .phps\n&" ${APACHE_BASEDIR}/conf/httpd.conf
+ if [ "$?" = "0" ]; then
+ echo_ok
+ else
+ echo_failed
+ fi
fi
+
fi
@@ -7599,6 +7610,31 @@ if $ACTIVATE_PHP_FPM_INIT_SCRIPT ; then
fi
fi
+if ! $WITHOUT_APACHE_MOD_PHP ; then
+
+ echo ""
+ echononl "\tiRestarting Apache Webserver.."
+ if $SYSTEMD_EXISTS ; then
+ systemctl restart apache2 > /dev/null 2>&1
+ if [[ "$?" = "0" ]]; then
+ echo_ok
+ else
+ echo_failed
+ error "Restarting Apache2 Webservice failed!"
+ fi
+ else
+ /etc/init.d/apache2 restart > /dev/null 2>&1
+ if [[ "$?" = "0" ]]; then
+ echo_ok
+ else
+ echo_failed
+ error "Restarting Apache2 Webservice failed!"
+ fi
+ fi
+
+fi
+
+
## -----
## - Rename /etc/mysql/my.cnf if MySQL was not installed from debian package system.