apache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctl

type Ctl struct {
	BinPath string
}

Ctl implements functions to work with apachectl cli utility

func GetApacheCtl

func GetApacheCtl(binPath string) (*Ctl, error)

GetApacheCtl returns apache2/httpd manager

func (*Ctl) GetVersion

func (a *Ctl) GetVersion() (string, error)

GetVersion returns apache version

func (*Ctl) ParseDefines

func (a *Ctl) ParseDefines() (map[string]string, error)

ParseDefines return the list of loaded module names.

func (*Ctl) ParseIncludes

func (a *Ctl) ParseIncludes() ([]string, error)

ParseIncludes returns Include directives from httpd process and returns a list of their values.

func (*Ctl) ParseModules

func (a *Ctl) ParseModules() ([]string, error)

ParseModules returns a map of the defined variables.

func (*Ctl) Restart

func (a *Ctl) Restart() error

Restart restarts apache webserver

func (*Ctl) TestConfiguration

func (a *Ctl) TestConfiguration() error

TestConfiguration checks the syntax of apache configuration files

type Site

type Site struct {
	DissiteBin, EnsiteBin string
}

Site implements functionality for site enabling/disabling

func GetApacheSite

func GetApacheSite(options map[string]string) *Site

GetApacheSite returns Site structure instance

func (*Site) Disable

func (s *Site) Disable(siteConfigName string) error

Disable disables site via a2dissite utility

func (*Site) Enable

func (s *Site) Enable(siteConfigName string) error

Enable enables site via a2ensite utility

Jump to

Keyboard shortcuts

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