X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/8a7c40fa29ff18a437fcf4ee3f248a7aeb41c19c..cf77b3e6ee0f8be6c7612f61497d8b02dde0cffa:/lib/apache.dtl?ds=sidebyside diff --git a/lib/apache.dtl b/lib/apache.dtl index 3b41927..ed6f8b1 100644 --- a/lib/apache.dtl +++ b/lib/apache.dtl @@ -1,12 +1,75 @@ {{Apache web server configuration}} +extern type web_node; +{{Nodes that accept Apache configuration from you}} + +extern val web_node_to_node : web_node -> node; + +extern type web_place; +extern val web_place_default : web_node -> web_place; +extern val web_place : web_node -> your_ip -> web_place; +extern val web_place_to_web_node : web_place -> web_node; +extern val web_place_to_node : web_place -> node; +extern val web_place_to_ip : web_place -> ip; +{{Web places are combinations of web nodes (servers on which you are allowed to + run web sites) and IP addresses on which those servers should listen for + requests.}} + context Vhost; {{A WWW virtual host}} +extern type suexec_flag; +{{Whether or not to use Suexec with a vhost. +For users with the 'www' privilege, this type is identical to [bool]. +For others, it has only one value, [true].}} + +extern type ssl_cert_path; +{{Filesystem path to an SSL certificate in your 'cert' list}} + +extern type ssl; +extern val no_ssl : ssl; +extern val use_cert : ssl_cert_path -> ssl; + extern val vhost : host -> Vhost => [Domain] - {WebNodes : [node], - SSL : bool, - User : your_user, - Group : your_group, - DocumentRoot : your_path, - ServerAdmin : email}; + {WebPlaces : [web_place], + SSL : ssl, + User : your_user, + Group : your_group, + DocumentRoot : your_path, + ServerAdmin : email, + SuExec : suexec_flag}; +{{Add a new named Apache virtual host, specifying which nodes' Apache servers + should answer requests for this host, whether it should use SSL, what UNIX + user and group dynamic content generators should be run as, the filesystem + path to the static content root, and the e-mail address to which error pages + should direct visitors.}} + +extern val vhostDefault : Vhost => [Domain] + {WebPlaces : [web_place], + SSL : ssl, + User : your_user, + Group : your_group, + DocumentRoot : your_path, + ServerAdmin : email, + SuExec : suexec_flag}; +{{Like vhost, but for, e.g., yourdomain.com instead of + www.yourdomain.com}} + +context Location; + +extern type location; +{{A valid URI prefix}} + +extern val location : location -> ^Vhost & Location => [Vhost & !Location]; +extern val directory : your_path -> ^Vhost & Location => [Vhost & !Location]; +{{Set some configuration specific to a URI prefix or filesystem directory, + respectively.}} + +extern val serverAliasHost : your_domain_host -> [Vhost]; +{{Give an alternate hostname for this vhost.}} +extern val serverAlias : host -> [Vhost]; +{{Like serverAliasHost, but adds an alias for the given hostname at every domain + being configured.}} +extern val serverAliasDefault : [Vhost]; +{{Like serverAliasDefault, but adds aliases for the domains being configured + instead of any of their hosts/"subdomains".}}