diff --git a/docs/rolereference.rst b/docs/rolereference.rst index 1125c7d74a673d49213e2bec7a456b2c34b3251d..c73499057ce321a8e5db9b3f4d7f9035da4d87c4 100644 --- a/docs/rolereference.rst +++ b/docs/rolereference.rst @@ -838,3 +838,55 @@ Here is an example configuration for setting-up the mail forwarder: smtp_relay_host: mail.example.com smtp_relay_truststore: /etc/ssl/certs/example_ca_chain.pem + + +Web Server +---------- + +The ``web_server`` role can be used for setting-up a web server on destination +machine. + +The role is supposed very lightweight, providing a basis for deployment of web +applications. + +The role implements the following: + +* Installs and configures nginx with a single, default vhost with a small static + index page. +* Deploys the HTTPS TLS private key and certificate (for default vhost). +* Configures firewall to allow incoming connections to the web server. + + +Parameters +~~~~~~~~~~ + +**https_tls_key** (string, mandatory) + Path to file on Ansible host that contains the private key used for TLS for + HTTPS service. The file will be copied to directory ``/etc/ssl/private/``. + +**https_tls_certificate** (string, mandatory) + Path to file on Ansible host that contains the X.509 certificate used for TLS + for HTTPS service. The file will be copied to directory ``/etc/ssl/certs/``. + +**web_default_title** (string, mandatory) + Title for the default web page shown to users (if no other vhosts were matched). + +**web_default_message** (string, mandatory) + Message for the default web page shown to users (if no other vhosts were + matched). + + +Examples +~~~~~~~~ + +Here is an example configuration for setting-up XMPP server using Prosody: + +.. code-block:: yaml + + --- + + https_tls_key: "{{ inventory_dir }}/tls/web.example.com_https.key" + https_tls_certificate: "{{ inventory_dir }}/tls/web.example.com_https.pem" + + web_default_title: "Welcome to Example Inc." + web_default_message: "You are attempting to access the web server using a wrong name or an IP address. Please check your URL."