nginx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2018 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ListenPort configures the TCP port where nginx will listen
	ListenPort uint16

	// Backend configures the backend port to which nginx will proxy
	BackendPort uint16

	// TrustedProxyIPRanges configures which upstream IP ranges nginx will trust to send correct X-Forwarded-For headers
	TrustedProxyIPRanges []string

	// AuditReceiverURL configures the HTTP/HTTPS endpoint where ModSecurity will log audit events
	AuditReceiverURL string

	// DetectionOnly puts the proxy into detection only mode (no blocking of attacks)
	DetectionOnly bool

	// PrependedRules configures a list of rules to include before the OWASP Core Rule Set
	PrependedRules []string

	// AppendedRules configures a list of rules to include after the OWASP Core Rule Set
	AppendedRules []string
}

Config specifies configuration for the nginx instance that runs ModSecurity

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents a running nginx instance

func Start

func Start(config Config, metrics *prometheus.Registry, metricsNamespace string) (*Server, error)

Start an nginx process tree

func (*Server) Reload

func (s *Server) Reload(config Config)

Reload the running nginx instance with a fresh configuration

func (*Server) WaitForExit

func (s *Server) WaitForExit() error

WaitForExit waits for the running nginx to exit (tailing stderr to the log as it waits)

Jump to

Keyboard shortcuts

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