49 lines
1.5 KiB
Bash
Executable File
49 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "🔒 HTTPS-Konfiguration für NeoNail DB"
|
|
echo "===================================="
|
|
|
|
# 1. .env für HTTPS aktualisieren
|
|
echo "📝 Aktualisiere .env für HTTPS..."
|
|
sed -i 's|APP_URL=http://192.168.30.81|APP_URL=https://neonail.vogt.de.com|' .env
|
|
sed -i 's|APP_URL=http://neonail.vogt.de.com|APP_URL=https://neonail.vogt.de.com|' .env
|
|
|
|
# 2. Laravel Cache leeren
|
|
echo "🧹 Leere Laravel Cache..."
|
|
php artisan config:clear 2>/dev/null || echo "⚠️ config:clear übersprungen"
|
|
php artisan cache:clear 2>/dev/null || echo "⚠️ cache:clear übersprungen"
|
|
|
|
# 3. Trusted Proxies konfigurieren (falls hinter Proxy)
|
|
echo "🔧 Konfiguriere Trusted Proxies..."
|
|
cat > config/trusted-proxies.php << 'EOF'
|
|
<?php
|
|
|
|
return [
|
|
'proxies' => [
|
|
'192.168.30.81',
|
|
'neonail.vogt.de.com',
|
|
],
|
|
'headers' => [
|
|
'X-Forwarded-For' => 'X_FORWARDED_FOR',
|
|
'X-Forwarded-Host' => 'X_FORWARDED_HOST',
|
|
'X-Forwarded-Proto' => 'X_FORWARDED_PROTO',
|
|
],
|
|
];
|
|
EOF
|
|
|
|
# 4. Session-Konfiguration für HTTPS
|
|
echo "🔐 Konfiguriere Sessions für HTTPS..."
|
|
sed -i 's|SESSION_SECURE_COOKIE=false|SESSION_SECURE_COOKIE=true|' .env 2>/dev/null || echo "⚠️ SESSION_SECURE_COOKIE nicht gefunden"
|
|
|
|
# 5. Test
|
|
echo "🧪 Teste HTTPS-Konfiguration..."
|
|
curl -I https://neonail.vogt.de.com
|
|
|
|
echo ""
|
|
echo "✅ HTTPS-Konfiguration abgeschlossen!"
|
|
echo "📋 Testen Sie: https://neonail.vogt.de.com"
|
|
echo ""
|
|
echo "📋 Falls Probleme auftreten:"
|
|
echo "1. Browser-Cache leeren"
|
|
echo "2. Laravel-Logs prüfen: tail -f storage/logs/laravel.log"
|