{% for vhost in apache_vhosts %} ServerName {{ vhost.server_name }} {% for alias in vhost.server_alias %} ServerAlias {{ alias }} {% endfor %} ServerAlias {{ inventory_hostname }} DocumentRoot {{ vhost.document_root }} CustomLog {{ apache_log_dir }}/{{ vhost.server_name }}_access.log combined ErrorLog {{ apache_log_dir }}/{{ vhost.server_name }}_error.log Options none Allowoverride none Require all denied Options indexes AuthName "stop" AuthType Basic AuthUserFile {{ apache_config_dir }}/passwd require valid-user