Domains Screen

nginx virtual host management with SSL certificate issuance, conflict-free port assignment, and live config editing.


Layout

+------------------------------------------------------------------+
|  Domain Manager   [Create Domain]   [Search: ____________]       |
+------------------------------------------------------------------+
|  ┌──────────────────────────────────────────────────────────────┐|
|  │ 🌐 example.com        :443   SSL ✓   nginx: active  [...]  │|
|  │ 🌐 api.example.com    :8443  SSL ✓   nginx: active  [...]  │|
|  │ 🌐 staging.example.com:8002  SSL ✗   nginx: active  [...]  │|
|  └──────────────────────────────────────────────────────────────┘|
+------------------------------------------------------------------+

Features

FeatureDescription
Domain ListAll configured vhosts
Create DomainName, optional port, optional document root, SSL toggle
Subdomain SupportSelect the associated parent domain (required)
Conflict-Free PortsUser port is verified free; empty port auto-assigns a free one (no conflicts)
Auto Document RootDefault /var/www/[domain]; custom location supported
Live Landing PageA styled "LIVE" index.html is auto-created on first deploy
Auto SSLLet's Encrypt certificate issued automatically via certbot
Edit DomainModify port, document root, SSL settings
Delete DomainRemove vhost (with confirmation)
nginx ConfigView/edit raw nginx config
SSL IssueIssue Let's Encrypt certificate
Bulk DeleteDelete multiple domains
Auto PortGet next available port

Create Flow

  1. Choose Domain or Subdomain.
  2. For a subdomain, select the associated parent domain (must already exist).
  3. Enter the full name (subdomains must belong to the selected parent, e.g. sub.example.com).
  4. Optionally enter a custom port. If left empty, a free port is auto-assigned from 8000-9000 — never reusing a port bound by another domain, nginx vhost, or running service.
  5. Optionally enter a document root (location). If left empty, /var/www/[domain] is created automatically.
  6. A styled "LIVE" landing page is auto-created at the root (only if index.html does not already exist).
  7. If SSL is enabled, a [domain].conf is written to /etc/nginx/conf.d/, a Let's Encrypt certificate is issued via certbot, and the vhost is served over HTTPS (on port 443 or the chosen custom port). If certbot fails (e.g. DNS not resolving), the domain is still created over HTTP and the SSL error is surfaced.

Generated nginx Config

[domain].conf is written to /etc/nginx/conf.d/ and includes:

  • server_name, correct listen directives (SSL + custom-port redirects)
  • root (custom or auto /var/www/[domain])
  • index index.html, try_files
  • Security headers (X-Frame-Options, X-Content-Type-Options, etc.)
  • Hidden-file access denial
  • Per-domain access/error logs

Modals

  • Create Domain (type, name, parent domain, port, document root, enable SSL)
  • nginx Config Editor (Ace editor with syntax highlighting)
  • SSL Issue (domain, email, staging toggle)
  • Delete Confirmation

CSS Classes

ClassPurpose
.dns-domain-cardDomain list item
.dns-ssl-badgeSSL status badge
.dns-config-editornginx config editor

API Calls

MethodEndpointPurpose
GET/api/domainsList domains
POST/api/domains/createCreate domain
PUT/api/domains/:nameUpdate domain
DELETE/api/domains/:nameDelete domain
GET/api/domains/:name/nginxGet nginx config
PUT/api/domains/:name/nginxSave nginx config
POST/api/domains/:name/sslIssue SSL

Part of NexusPanel Documentation

← Back to Documentation