1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- {% if ansible_prolog -%}
- {% from 'templates/ansible/prolog.j2' import prolog with context %}
- {{ prolog() }}
- {% endif -%}
- # Apache vhost for phpmyadmin
- <VirtualHost {%if phpmyadmin_vhostip %}{{ phpmyadmin_vhostip }}{% else %}*{% endif %}:{%if phpmyadmin_vhostport %}{{ phpmyadmin_vhostport }}{% else %}80{% endif %}>
- 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 http_auth_phpmyadmin %}
- <Location />
- AuthType basic
- AuthName "Restricted Access"
- AuthUserFile /etc/apache2/auth_admin
- Require valid-user
- </Location>
- {% endif %}
- Include /etc/phpmyadmin/apache.conf
- <IfModule mod_php5.c>
- php_admin_value max_execution_time 240
- php_admin_value upload_max_filesize 128M
- php_admin_value post_max_size 128M
- </IfModule>
- {% 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 %}
- </VirtualHost>
- {% if phpmyadmin_ssl and ssl_certs_auto_installed.stdout_lines is defined and phpmyadmin_vhostname in ssl_certs_auto_installed.stdout_lines %}
- <VirtualHost {%if phpmyadmin_vhostip %}{{ phpmyadmin_vhostip }}{% else %}*{% endif %}:{%if phpmyadmin_vhostport %}{{ phpmyadmin_vhostport }}{% else %}443{% endif %}>
- ServerName {{ phpmyadmin_vhostname }}
- <IfModule http2_module>
- Protocols h2 http/1.1
- </IfModule>
- Include vhost_ssl_auto-{{ phpmyadmin_vhostname }}.conf
- DocumentRoot /usr/share/phpmyadmin
- DirectoryIndex index.php
- {% if http_auth_phpmyadmin %}
- <Location />
- AuthType basic
- AuthName "Restricted Access"
- AuthUserFile /etc/apache2/auth_admin
- Require valid-user
- </Location>
- {% endif %}
- Include /etc/phpmyadmin/apache.conf
- <IfModule mod_php5.c>
- php_admin_value max_execution_time 240
- php_admin_value upload_max_filesize 128M
- php_admin_value post_max_size 128M
- </IfModule>
- <IfModule php7_module>
- php_admin_value max_execution_time 240
- php_admin_value upload_max_filesize 128M
- php_admin_value post_max_size 128M
- </IfModule>
- {% 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
- </VirtualHost>
- {% endif %}
|