propellor-2.17.1: property-based host configuration management in haskell

Safe HaskellNone
LanguageHaskell98

Propellor.Property.Apache

Synopsis

Documentation

listenPorts :: [Port] -> Property NoInfo Source

Make apache listen on the specified ports.

Note that ports are also specified inside a site's config file, so that also needs to be changed.

multiSSL :: Property NoInfo Source

Configure apache to use SNI to differentiate between https hosts.

This was off by default in apache 2.2.22. Newver versions enable it by default. This property uses the filename used by the old version.

allowAll :: ConfigLine Source

Config file fragment that can be inserted into a Directory stanza to allow global read access to the directory.

Works with multiple versions of apache that have different ways to do it.

iconDir :: ConfigLine Source

Config file fragment that can be inserted into a VirtualHost stanza to allow apache to display directory index icons.

virtualHost :: Domain -> Port -> WebRoot -> RevertableProperty NoInfo Source

A basic virtual host, publishing a directory, and logging to the combined apache log file. Not https capable.

virtualHost' :: Domain -> Port -> WebRoot -> [ConfigLine] -> RevertableProperty NoInfo Source

Like virtualHost but with additional config lines added.

httpsVirtualHost :: Domain -> WebRoot -> AgreeTOS -> RevertableProperty NoInfo Source

A virtual host using https, with the certificate obtained using letsEncrypt.

http connections are redirected to https.

Example:

httpsVirtualHost "example.com" "/var/www"
	(LetsEncrypt.AgreeTOS (Just "me@my.domain"))

Note that reverting this property does not remove the certificate from letsencrypt's cert store.

httpsVirtualHost' :: Domain -> WebRoot -> AgreeTOS -> [ConfigLine] -> RevertableProperty NoInfo Source

Like httpsVirtualHost but with additional config lines added.