Local changes before sync

Dieser Commit ist enthalten in:
2025-06-28 20:41:24 +00:00
Ursprung 972401cce9
Commit 3a75523384
1499 geänderte Dateien mit 44121 neuen und 18 gelöschten Zeilen

Datei anzeigen

@@ -0,0 +1,47 @@
#!/bin/sh
# Temporäre Nginx config für Let's Encrypt Challenge
cat > /etc/nginx/conf.d/default.conf << EOF
server {
listen 80;
server_name admin-panel-undso.z5m7q9dk3ah2v1plx6ju.com api-software-undso.z5m7q9dk3ah2v1plx6ju.com;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://\$host\$request_uri;
}
}
EOF
# Nginx starten
nginx
# Let's Encrypt Zertifikate holen
echo "Requesting Let's Encrypt certificates..."
certbot certonly --webroot -w /var/www/certbot \
-d admin-panel-undso.z5m7q9dk3ah2v1plx6ju.com \
-d api-software-undso.z5m7q9dk3ah2v1plx6ju.com \
--non-interactive \
--agree-tos \
--email admin@z5m7q9dk3ah2v1plx6ju.com \
--no-eff-email
# Prüfen ob erfolgreich
if [ $? -eq 0 ]; then
echo "Certificates obtained successfully!"
# Nginx stoppen
nginx -s stop
# Kopiere die echte config
cp /etc/nginx/nginx.conf.real /etc/nginx/nginx.conf
# Nginx mit SSL starten
nginx -g "daemon off;"
else
echo "Failed to obtain certificates"
nginx -g "daemon off;"
fi