feat: initial commit – Mitai Jinkendo v9a
This commit is contained in:
commit
89b6c0b072
51 files changed
+9458
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# Let's Encrypt Setup für mitai.jinkendo.de
|
||||
# Voraussetzungen:
|
||||
# - nginx läuft
|
||||
# - Port 80 ist von außen erreichbar (DynDNS/MyFRITZ!)
|
||||
# - mitai.jinkendo.de zeigt auf diese IP
|
||||
|
||||
DOMAIN="mitai.jinkendo.de"
|
||||
EMAIL="lars@stommer.de" # Für Let's Encrypt Benachrichtigungen
|
||||
|
||||
echo "=== Let's Encrypt Setup für $DOMAIN ==="
|
||||
|
||||
# Certbot installieren
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y certbot python3-certbot-nginx
|
||||
|
||||
# Zertifikat holen
|
||||
sudo certbot --nginx \
|
||||
-d $DOMAIN \
|
||||
--email $EMAIL \
|
||||
--agree-tos \
|
||||
--non-interactive \
|
||||
--redirect
|
||||
|
||||
echo ""
|
||||
echo "=== Auto-Renewal einrichten ==="
|
||||
# Certbot richtet automatisch einen systemd-Timer ein
|
||||
# Prüfen mit:
|
||||
sudo systemctl status certbot.timer
|
||||
|
||||
echo ""
|
||||
echo "=== Fertig! ==="
|
||||
echo "Zertifikat läuft 90 Tage, erneuert sich automatisch alle 60 Tage."
|
||||
echo "Prüfen mit: sudo certbot renew --dry-run"
|
||||
@@ -0,0 +1,67 @@
|
||||
# Mitai Jinkendo - nginx Production Config
|
||||
# Place at: /etc/nginx/sites-available/jinkendo
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name mitai.jinkendo.de;
|
||||
|
||||
# Let's Encrypt challenge
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
# Redirect all HTTP to HTTPS
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name mitai.jinkendo.de;
|
||||
|
||||
# SSL - managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/mitai.jinkendo.de/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/mitai.jinkendo.de/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
# Security Headers
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
|
||||
# Gzip
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
|
||||
gzip_min_length 1000;
|
||||
|
||||
# Rate limiting zones (defined in http block)
|
||||
# limit_req_zone $binary_remote_addr zone=api:10m rate=100r/m;
|
||||
# limit_req_zone $binary_remote_addr zone=login:10m rate=5r/m;
|
||||
|
||||
# API - Backend
|
||||
location /api/ {
|
||||
# limit_req zone=api burst=20 nodelay;
|
||||
proxy_pass http://127.0.0.1:8002;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 120s; # KI-Calls können länger dauern
|
||||
client_max_body_size 20M; # CSV + Foto Uploads
|
||||
}
|
||||
|
||||
# Frontend - React PWA
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3002;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user