Configuration

    Reverse proxy

    For production deployments, put collectd-web behind nginx or Apache to terminate TLS and add authentication.

    nginx example

    nginx
    server {
      listen 443 ssl http2;
      server_name metrics.example.com;
    
      ssl_certificate     /etc/letsencrypt/live/metrics.example.com/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/metrics.example.com/privkey.pem;
    
      location / {
        auth_basic           "Metrics";
        auth_basic_user_file /etc/nginx/.htpasswd;
        proxy_pass           http://127.0.0.1:8888;
        proxy_set_header     Host $host;
      }
    }