Skip to content

apache/vhosts

List of Apache virtual host configurations

Apache Virtual Hosts Parameter

Defines a list of virtual host configurations to render into a drop-in config file. Each entry produces a <VirtualHost> block.

When empty (the default), no vhosts config file is placed and Apache serves from its default document root.

Fields per entry

  • server_name (required): The ServerName directive
  • port (optional, default 80): Listen port
  • document_root (optional, default /var/www/html): Document root path
  • error_log (optional): Error log path
  • access_log (optional): Access log path
  • extra (optional): Additional directives to include in the vhost block

Usage Example

YAML
apache/vhosts:
  - server_name: example.com
    document_root: /var/www/example
  - server_name: api.example.com
    port: 8080
    document_root: /var/www/api
    extra: |
      ProxyPass / http://localhost:3000/
      ProxyPassReverse / http://localhost:3000/

Objects that Reference apache/vhosts

Objects used by apache/vhosts

Not used in current content packs