diff --git a/setupnc.sh b/setupnc.sh index 0839708..225c9b2 100644 --- a/setupnc.sh +++ b/setupnc.sh @@ -48,6 +48,13 @@ a2dismod mpm_prefork a2enmod mpm_event proxy proxy_fcgi setenvif rewrite a2enconf php8.3-fpm systemctl restart apache2 +cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.original +linenum=$(cat /etc/apache2/apache2.conf | grep -n '' | cut -d: -f1) +until sed -n "${linenum}p" /etc/apache2/apache2.conf | grep "AllowOverride"> /dev/null; do + ((linenum++)) +done +sed -i "${linenum}s/\bNone\b/All/" /etc/apache2/apache2.conf +systemctl restart apache2 ## Set optimal settings for PHP to make Nextcloud happy...