{% if ansible_prolog -%} {% from 'templates/ansible/prolog.j2' import prolog with context %} {{ prolog() }} {% endif -%} # Apache vhost for phpmyadmin ServerName {{ phpmyadmin_vhostname }} Include conf-available/letsencrypt.conf {% if phpmyadmin_ssl and ssl_certs_auto_installed.stdout_lines is defined and phpmyadmin_vhostname in ssl_certs_auto_installed.stdout_lines %} RedirectMatch 301 ^(?!/\.well-known/acme-challenge/).* https://{{ phpmyadmin_vhostname }}$0 {% else %} DocumentRoot /usr/share/phpmyadmin DirectoryIndex index.php {% if phpmyadmin_http_auth %} AuthType basic AuthName "Restricted Access" AuthUserFile /etc/apache2/auth_admin {% if phpmyadmin_http_whitelist_ip|length > 0 %} Require ip {{ phpmyadmin_http_whitelist_ip | join(' ') }} {% endif %} Require valid-user {% endif %} Include /etc/phpmyadmin/apache.conf php_admin_value max_execution_time 240 php_admin_value upload_max_filesize 128M php_admin_value post_max_size 128M php_admin_value max_input_vars 10000 php_admin_value max_execution_time 240 php_admin_value upload_max_filesize 128M php_admin_value post_max_size 128M php_admin_value max_input_vars 10000 {% if with_fpm|bool %} Include conf-available/fpm-pool.conf {% endif %} LogLevel warn CustomLog ${APACHE_LOG_DIR}/pma.access.log combined ErrorLog ${APACHE_LOG_DIR}/pma.error.log {% endif %} {% if phpmyadmin_ssl and ssl_certs_auto_installed.stdout_lines is defined and phpmyadmin_vhostname in ssl_certs_auto_installed.stdout_lines %} ServerName {{ phpmyadmin_vhostname }} Protocols h2 http/1.1 Include vhost_ssl_auto-{{ phpmyadmin_vhostname }}.conf DocumentRoot /usr/share/phpmyadmin DirectoryIndex index.php {% if phpmyadmin_http_auth %} AuthType basic AuthName "Restricted Access" AuthUserFile /etc/apache2/auth_admin {% if phpmyadmin_http_whitelist_ip|length > 0 %} Require ip {{ phpmyadmin_http_whitelist_ip | join(' ') }} {% endif %} Require valid-user {% endif %} Include /etc/phpmyadmin/apache.conf php_admin_value max_execution_time 240 php_admin_value upload_max_filesize 128M php_admin_value post_max_size 128M php_admin_value max_input_vars 10000 php_admin_value max_execution_time 240 php_admin_value upload_max_filesize 128M php_admin_value post_max_size 128M php_admin_value max_input_vars 10000 {% if with_fpm|bool %} Include conf-available/fpm-pool.conf {% endif %} LogLevel warn CustomLog ${APACHE_LOG_DIR}/pma.access.log combined ErrorLog ${APACHE_LOG_DIR}/pma.error.log {% endif %}