如何管理多个域名?

SSLcat 提供了强大的多域名管理功能,让你可以统一管理多个业务域名的 SSL 证书和转发配置。

多域名配置结构

在配置文件中定义多个域名:

# 多域名配置示例
certificates:
  - domain: "example.com"
    validation: "http"
    auto_renew: true
  
  - domain: "www.example.com"
    validation: "http"
    auto_renew: true
  
  - domain: "api.example.com"
    validation: "http"
    auto_renew: true
  
  - domain: "admin.example.com"
    validation: "http"
    auto_renew: true

proxies:
  - domain: "example.com"
    target: "http://localhost:3000"
    protocol: "http"
  
  - domain: "www.example.com"
    target: "http://localhost:3000"
    protocol: "http"
  
  - domain: "api.example.com"
    target: "http://localhost:8080"
    protocol: "http"
  
  - domain: "admin.example.com"
    target: "http://localhost:9000"
    protocol: "http"

通配符证书管理

使用通配符证书简化多域名管理:

# 通配符证书配置
certificates:
  - domain: "*.example.com"
    validation: "dns"
    dns_provider: "cloudflare"
    dns_credentials:
      api_token: "your-api-token"
    auto_renew: true

proxies:
  - domain: "www.example.com"
    target: "http://localhost:3000"
    certificate: "*.example.com"
  
  - domain: "api.example.com"
    target: "http://localhost:8080"
    certificate: "*.example.com"
  
  - domain: "admin.example.com"
    target: "http://localhost:9000"
    certificate: "*.example.com"

批量证书操作

支持批量证书管理操作:

域名分组管理

按业务或环境分组管理域名:

# 按环境分组
certificates:
  production:
    - domain: "example.com"
    - domain: "www.example.com"
    - domain: "api.example.com"
  
  staging:
    - domain: "staging.example.com"
    - domain: "staging-api.example.com"
  
  development:
    - domain: "dev.example.com"
    - domain: "dev-api.example.com"

自动化运维

多域名的自动化管理:

管理面板操作

通过 Web 管理面板管理多域名:

监控和告警

多域名监控功能:

最佳实践

多域名管理的最佳实践:

通过 SSLcat 的多域名管理功能,你可以轻松管理大量域名的 SSL 证书和转发配置。