apache-configure¶
Configures Apache index page and optional virtual hosts
Apache Configure Task¶
This task places Apache configuration files using DRP's template-based file placement. It handles:
-
Index Page — renders a default index.html from the
apache/index-templateparameter. Controlled byapache/render-index(default: true). When disabled, the template renders to /dev/null. -
Virtual Hosts — renders a vhosts drop-in config from the
apache/vhostsparameter. When the list is empty (default), no config file is placed. When populated, a config file is dropped into the OS-appropriate directory.
Template Variables¶
The index template supports Machine parameter expansion:
- .Machine.UUID: Machine's unique identifier
- .Machine.Address: Machine's IP address
- .Machine.Name: Machine's hostname
Operating System Support¶
Index Page Path¶
- Photon OS:
/etc/httpd/html/index.html - Other OS:
/var/www/html/index.html
Virtual Hosts Config Path¶
- RHEL/Photon:
/etc/httpd/conf.d/apache-vhosts.conf - Debian:
/etc/apache2/sites-enabled/apache-vhosts.conf
Parameters¶
apache/render-index: Boolean, controls index.html placement (default: true)apache/index-template: Template name for the index pageapache/vhosts: List of virtual host configurations (default: empty)
Objects that Reference apache-configure¶
- blueprints apache-configure in Apache as part of Tasks (declared)
Objects used by apache-configure¶
- templates apache-index.html.tmpl in field Templates[0].ID as value apache-index.html.tmpl
- templates apache-vhosts.conf.tmpl in field Templates[1].ID as value apache-vhosts.conf.tmpl
- params apache/render-index
- params inventory/os-family
- params apache/vhosts
- params inventory/os-family