nginx

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureNginxConfig

func EnsureNginxConfig() error

EnsureNginxConfig copies the base nginx.conf to the data dir if it is missing.

func GenerateProxyVhost added in v0.1.21

func GenerateProxyVhost(domain, upstreamHost string, upstreamPort int) error

GenerateProxyVhost renders vhost-proxy.conf.tmpl and writes conf.d/{domain}.conf.

func GenerateSSLVhost

func GenerateSSLVhost(site config.Site, phpVersion string) error

GenerateSSLVhost renders the SSL vhost template and writes it to conf.d.

func GenerateVhost

func GenerateVhost(site config.Site, phpVersion string) error

GenerateVhost renders the HTTP vhost template and writes it to conf.d.

func GetTemplate

func GetTemplate(name string) ([]byte, error)

GetTemplate returns the content of a named nginx template/config file. name can be "nginx.conf", "vhost.conf.tmpl", or "vhost-ssl.conf.tmpl".

func Reload

func Reload() error

Reload signals nginx to reload its configuration.

func RemoveVhost

func RemoveVhost(domain string) error

RemoveVhost deletes the vhost config files for the given domain.

Types

type VhostData

type VhostData struct {
	Domain          string
	Path            string
	PHPVersion      string
	PHPVersionShort string
}

VhostData is the data passed to vhost templates.

Jump to

Keyboard shortcuts

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