ServerName {{ zabbix_url }} ServerAlias {{ apachectl_version.stdout }} {% for alias in zabbix_url_aliases %} ServerAlias {{ alias }} {% endfor %} ## Vhost docroot DocumentRoot "/usr/share/zabbix" {% set directory_paths = ['/usr/share/zabbix/conf', '/usr/share/zabbix/api', '/usr/share/zabbix/include', '/usr/share/zabbix/include/classes'] %} {% if apache_version|string() == '2.4' %} Options FollowSymLinks AllowOverride None Require all granted {% else %} AllowOverride None Order Allow,Deny Allow from all {% endif %} {% for my_path in directory_paths %} {% if apache_version|string() == '2.4' %} Require all granted {% else %} AllowOverride None Order Deny,Allow Deny from all {% endif %} {% endfor %} ## Logging ErrorLog "/var/log/{{ apache_log }}/{{ zabbix_url }}_error.log" ServerSignature Off CustomLog "/var/log/{{ apache_log }}/{{ zabbix_url }}_access.log" combined ## Rewrite rules RewriteEngine On RewriteRule ^$ /index.php [L] ## Custom fragment php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 # Set correct timezone. php_value date.timezone {{ zabbix_timezone }}