{% if ansible_prolog -%} {% from 'templates/ansible/prolog.j2' import prolog with context %} {{ prolog() }} {% endif -%} # Apache vhost for PHP system checks ServerName {{ phpsyscheck_vhostname }} {% if phpsyscheck_ssl and ssl_certs_auto_installed.stdout_lines is defined and phpsyscheck_vhostname in ssl_certs_auto_installed.stdout_lines %} RedirectMatch permanent (.*) https://{{ phpsyscheck_vhostname }}$1 {% else %} DocumentRoot /etc/phpsyscheck DirectoryIndex index.php AuthType basic AuthName "Restricted Access" AuthUserFile /etc/apache2/auth_admin Require valid-user Options None AllowOverride None Order allow,deny Allow from all LogLevel warn CustomLog ${APACHE_LOG_DIR}/sys.access.log combined ErrorLog ${APACHE_LOG_DIR}/sys.error.log {% endif %} {% if phpsyscheck_ssl and ssl_certs_auto_installed.stdout_lines is defined and phpsyscheck_vhostname in ssl_certs_auto_installed.stdout_lines %} ServerName {{ phpsyscheck_vhostname }} Include vhost_ssl_auto-{{ phpsyscheck_vhostname }}.conf DocumentRoot /etc/phpsyscheck DirectoryIndex index.php {% if http_auth_phpmyadmin %} AuthType basic AuthName "Restricted Access" AuthUserFile /etc/apache2/auth_admin Require valid-user {% endif %} Options None AllowOverride None Order allow,deny Allow from all LogLevel warn CustomLog ${APACHE_LOG_DIR}/sys.access.log combined ErrorLog ${APACHE_LOG_DIR}/sys.error.log {% endif %}