{% for vhost in apache_vhosts %} ServerName {{ vhost.servername|lower }} ServerAlias {{ vhost.serveralias }} DocumentRoot {{ vhost.documentroot }} CustomLog {{ vhost.accesslog }} combined ErrorLog {{ vhost.errorlog }} Options none Allowoverride none Require all denied Options {{ vhost.documentrootoptions|default( "none" ) }} Require all granted Alias /private /usr/share/doc Options indexes AuthName "stop" AuthType Basic AuthUserFile {{ apache_conf_dir }}/passwd require valid-user {% endfor %}