update_nginx_conf
This commit is contained in:
@@ -1,56 +1,14 @@
|
|||||||
# pgAdmin 4 — nginx reverse proxy config
|
# NOT IN USE — Gebruik Nginx Proxy Manager (NPM) op 192.168.1.173:81
|
||||||
# Domein: postgres.el-kadi.nl → backend op localhost:5434
|
|
||||||
#
|
#
|
||||||
# Plaats in /etc/nginx/sites-available/ en symlink naar sites-enabled/
|
# Deze nginx config is een referentie voor de proxy regels.
|
||||||
# Of in /etc/nginx/conf.d/
|
# De daadwerkelijke reverse proxy staat in NPM (LXC container op Proxmox).
|
||||||
#
|
#
|
||||||
# Vereist SSL certificaat van Let's Encrypt / certbot.
|
# NPM proxy host (al geconfigureerd via API):
|
||||||
|
# Domein: postgres.el-kadi.nl
|
||||||
server {
|
# Forward naar: http://192.168.1.211:5434
|
||||||
listen 80;
|
# SSL: Let's Encrypt (cert pas mogelijk na DNS record)
|
||||||
server_name postgres.el-kadi.nl;
|
#
|
||||||
|
# DNS: postgres.el-kadi.nl A 62.166.181.56
|
||||||
return 301 https://$host$request_uri;
|
# Port forward op UniFi: 80/443 → 192.168.1.173
|
||||||
}
|
#
|
||||||
|
# Toegang direct (LAN): http://192.168.1.211:5434
|
||||||
server {
|
|
||||||
listen 443 ssl http2;
|
|
||||||
server_name postgres.el-kadi.nl;
|
|
||||||
|
|
||||||
# ── SSL certificaten ─────────────────────────────────────────────────
|
|
||||||
ssl_certificate /etc/letsencrypt/live/postgres.el-kadi.nl/fullchain.pem;
|
|
||||||
ssl_certificate_key /etc/letsencrypt/live/postgres.el-kadi.nl/privkey.pem;
|
|
||||||
|
|
||||||
# ── SSL beveiliging ──────────────────────────────────────────────────
|
|
||||||
ssl_protocols TLSv1.2 TLSv1.3;
|
|
||||||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
|
|
||||||
ssl_prefer_server_ciphers off;
|
|
||||||
ssl_session_cache shared:SSL:10m;
|
|
||||||
ssl_session_timeout 1d;
|
|
||||||
|
|
||||||
# ── security headers ─────────────────────────────────────────────────
|
|
||||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
|
|
||||||
# ── logging ──────────────────────────────────────────────────────────
|
|
||||||
access_log /var/log/nginx/pgadmin-access.log;
|
|
||||||
error_log /var/log/nginx/pgadmin-error.log;
|
|
||||||
|
|
||||||
# ── proxy naar pgAdmin ───────────────────────────────────────────────
|
|
||||||
location / {
|
|
||||||
proxy_pass http://127.0.0.1:5434;
|
|
||||||
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;
|
|
||||||
|
|
||||||
# pgAdmin vereist lange sessies
|
|
||||||
proxy_read_timeout 300s;
|
|
||||||
proxy_send_timeout 300s;
|
|
||||||
proxy_buffering off;
|
|
||||||
client_max_body_size 10M;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user