Files
Notizen/05_Persönliche Notizen/Computer/nginx als Proxy.md
2026-06-03 13:56:26 +02:00

42 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
AI Overview
Der NGINX Proxy Manager (NPM) ist ein Docker-basiertes Tool, um Dienste einfach über eine Weboberfläche per Reverse Proxy (Port 80/443) sicher im Internet verfügbar zu machen  ==Es erfordert eine **Domain**, **Portweiterleitungen** (80, 443) im Router, **DynDNS** bei wechselnder IP, **Docker**-Installation und das Erstellen von **Proxy-Hosts** im NPM für SSL-Zertifikate 
**Schritt-für-Schritt-Einrichtung:**
1. **Voraussetzungen:**
- Docker und Docker-Compose müssen auf dem Zielsystem (z.B. Raspberry Pi, NAS, Server) installiert sein 
- Eine Domain (z.B. über Cloudflare, DuckDNS) muss auf die externe IP des Routers zeigen .
- Im Router (z.B. Fritz!Box) müssen Port 80 (HTTP) und 443 (HTTPS) an die interne IP des NPM-Servers weitergeleitet werden 
2. **Installation via Docker-Compose:**
- Erstellen Sie eine `docker-compose.yml` Datei 
yaml
```
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
```
Use code with caution.
- Starten Sie den Container mit `docker-compose up -d` .
3. **Konfiguration im Webinterface:**
- Rufen Sie `http://<IP-des-Servers>:81` auf (Standard-Login: `admin@example.com` / `changeme`) 
- **Proxy-Host hinzufügen:** Gehen Sie zu "Hosts" -> "Proxy Hosts" -> "Add Proxy Host" Proxy-Seller.
- **Domain-Name:** Geben Sie Ihre Subdomain ein (z.B. `nextcloud.example.com`).
- **Forward-Details:** Geben Sie die interne IP (z.B. `192.168.1.10`) und den Port des Dienstes ein
- **SSL:** Aktivieren Sie unter "SSL" die Option "Request a new SSL Certificate" von Let's Encrypt 
Um die Sicherheit zu erhöhen, aktivieren Sie "Block Common Exploits" und aktivieren Sie Websockets, falls benötigt