#!/bin/bash echo "๐ŸŒ Apache DocumentRoot korrigieren" echo "=================================" # 1. Standard-Site deaktivieren echo "๐Ÿ”ง Deaktiviere Standard-Site..." a2dissite 000-default.conf 2>/dev/null || echo "โš ๏ธ Standard-Site bereits deaktiviert" # 2. NeoNail-Site neu erstellen echo "๐Ÿ“ Erstelle NeoNail-Site neu..." cat > /etc/apache2/sites-available/neonail.conf << 'EOF' ServerName 192.168.30.81 DocumentRoot /var/www/html/public AllowOverride All Require all granted Options Indexes FollowSymLinks # Sicherheit fรผr sensible Dateien Order allow,deny Deny from all Order allow,deny Deny from all ErrorLog ${APACHE_LOG_DIR}/neonail_error.log CustomLog ${APACHE_LOG_DIR}/neonail_access.log combined EOF # 3. NeoNail-Site aktivieren echo "โœ… Aktiviere NeoNail-Site..." a2ensite neonail.conf # 4. Apache-Konfiguration testen echo "๐Ÿ” Teste Apache-Konfiguration..." apache2ctl configtest # 5. Apache neu laden echo "๐Ÿ”„ Lade Apache neu..." systemctl reload apache2 # 6. Status prรผfen echo "๐Ÿ“Š Apache-Status..." systemctl status apache2 --no-pager -l # 7. Test echo "๐Ÿงช Teste Anwendung..." curl -I http://192.168.30.81 echo "" echo "โœ… Apache DocumentRoot korrigiert!" echo "๐Ÿ“‹ Testen Sie: http://192.168.30.81" echo "" echo "๐Ÿ“‹ Falls es nicht funktioniert:" echo "1. Apache-Logs: tail -f /var/log/apache2/neonail_error.log" echo "2. DocumentRoot prรผfen: apache2ctl -S"