ActiveDebianSync reverse-proxy Support for it's Web Console
Want to publish the ActiveDebianSync behind Nginx
This document explains how to configure nginx as a reverse proxy for the ActiveDebianSync web console.
Add the following settings to your config.json:
{
"web_console_enabled": true,
"web_console_port": 8090,
"web_console_listen_addr": "127.0.0.1",
"web_console_base_path": "", //URL path prefix (e.g., /console)
"web_console_trusted_proxies": "127.0.0.1", //Comma-separated list of trusted proxy IPs or CIDRs
"web_console_secure_cookies": true //Force secure cookies (for HTTPS proxy)
}
Option 1: Dedicated Domain/Subdomain (Recommended)
This is the simplest configuration where the web console runs on its own subdomain.
server {
listen 443 ssl http2;
server_name console.example.com;
ssl_certificate /etc/ssl/certs/console.example.com.crt;
ssl_certificate_key /etc/ssl/private/console.example.com.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256;
ssl_prefer_server_ciphers off;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
location / {
proxy_pass http://127.0.0.1:8090;
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_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
}
Option 2: Path-Based Proxy (Shared Domain)
Run the web console under a path like /console on an existing domain.
config.json:
{
"web_console_base_path": "/console",
"web_console_trusted_proxies": "127.0.0.1",
"web_console_secure_cookies": true
}
server {
listen 443 ssl http2;
server_name example.com;
# ... existing SSL and other configuration ...
# ActiveDebianSync Web Console
location /console/ {
proxy_pass http://127.0.0.1:8090/;
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_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
# ... other locations ...
}