config

package
v1.4.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const Name = `nginx`

Variables

View Source
var CertbotCertDirs = map[string]string{
	`cert`:  `/etc/letsencrypt/live/{domain}/fullchain.pem`,
	`key`:   `/etc/letsencrypt/live/{domain}/privkey.pem`,
	`trust`: `/etc/letsencrypt/live/{domain}/chain.pem`,
}
View Source
var LegoCertDirs = map[string]string{
	`cert`:  `{workDir}/.lego/certificates/{domain}.crt`,
	`key`:   `{workDir}/.lego/certificates/{domain}.key`,
	`trust`: ``,
}

Functions

func DefaultConfigDir added in v1.4.7

func DefaultConfigDir() string

func RenewCertByCertbot added in v1.4.10

func RenewCertByCertbot(ctx context.Context, customCmd string, domains []string, email string, certDir string, isObtain bool) error

http://coscms.com/.well-known/acme-challenge/Ito***l4-Fh7O5FpaAA*************LI3vTPo 申请: certbot certonly --webroot -d example.com --email info@example.com -w /var/www/_letsencrypt -n --agree-tos --force-renewal 更新 certbot renew 更新所有 certbot renew --cert-name example.com --force-renewal

func RenewCertByLego added in v1.4.10

func RenewCertByLego(ctx context.Context, customCmd string, domains []string, email string, certDir string, isObtain bool) error

申请: lego --accept-tos --email you@example.com --http --http.webroot /path/to/webroot --domains example.com run https://go-acme.github.io/lego/usage/cli/obtain-a-certificate/ 更新: lego --email="you@example.com" --domains="example.com" --http renew https://go-acme.github.io/lego/usage/cli/renew-a-certificate/

Types

type Config

type Config struct {
	Version        string
	CertPathFormat engine.CertPathFormat
	*engine.CommonConfig
}

func New added in v1.4.7

func New() *Config

func (*Config) CopyFrom added in v1.4.7

func (c *Config) CopyFrom(m *dbschema.NgingVhostServer)

func (*Config) FixEngineConfigFile added in v1.4.7

func (c *Config) FixEngineConfigFile(deleteMode ...bool) (bool, error)

func (*Config) GetCertPathFormat added in v1.4.7

func (c *Config) GetCertPathFormat(ctx echo.Context) engine.CertPathFormat

func (*Config) GetVhostConfigDirAbs added in v1.4.7

func (c *Config) GetVhostConfigDirAbs() (string, error)

func (*Config) GetVhostConfigLocalDirAbs added in v1.4.7

func (c *Config) GetVhostConfigLocalDirAbs() (string, error)

func (*Config) Init

func (c *Config) Init() error

func (*Config) OnVhostConfigSaving added in v1.4.7

func (c *Config) OnVhostConfigSaving(id uint, formData *form.Values) error

func (*Config) Quit

func (c *Config) Quit(ctx context.Context) error

func (*Config) Reload

func (c *Config) Reload(ctx context.Context) error

func (*Config) RemoveCertFile added in v1.4.7

func (c *Config) RemoveCertFile(id uint) error

func (*Config) RemoveVhostConfig added in v1.4.7

func (c *Config) RemoveVhostConfig(id uint) error

func (*Config) RenewCert added in v1.4.10

func (c *Config) RenewCert(ctx echo.Context, id uint, domains []string, email string, isObtain bool) error

func (*Config) Reopen

func (c *Config) Reopen(ctx context.Context) error

func (*Config) Start

func (c *Config) Start(ctx context.Context) error

func (*Config) Stop

func (c *Config) Stop(ctx context.Context) error

func (*Config) TestConfig added in v1.4.7

func (c *Config) TestConfig(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL