Skip to content

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:

  1. Index Page — renders a default index.html from the apache/index-template parameter. Controlled by apache/render-index (default: true). When disabled, the template renders to /dev/null.

  2. Virtual Hosts — renders a vhosts drop-in config from the apache/vhosts parameter. 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 page
  • apache/vhosts: List of virtual host configurations (default: empty)

Objects that Reference apache-configure

Objects used by apache-configure