echo "Dein Webserver wird installiert..."
apt install -y apache2 mariadb-server certbot php-common php-fpm php-mysql php-gd php-curl php-mbstring php-intl php-gmp php-bcmath php-xml php-imagick php-zip
# Module Konfigurieren
a2enmod rewrite
a2enmod headers
a2enmod http2
a2enmod proxy
a2enmod proxy_http
a2enmod proxy_http2
a2enmod ssl
a2enmod proxy_fcgi
# Site confs
a2dissite 000-default
rm /etc/apache2/sites-available/000-default.conf
rm /etc/apache2/sites-available/default-ssl.conf
rm -rv /var/www/html
echo "<VirtualHost *:80>" > /etc/apache2/sites-available/web.conf
echo "  ServerName localhost" >> /etc/apache2/sites-available/web.conf
echo "  DocumentRoot /var/www/rackl/" >> /etc/apache2/sites-available/web.conf
echo "</VirtualHost>" >> /etc/apache2/sites-available/web.conf
a2ensite web
a2enconf php8.1-fpm
systemctl restart apache2