pga_vhost.j2 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. # Apache vhost for phppgadmin
  6. <VirtualHost {%if phppgadmin_vhostip %}{{ phppgadmin_vhostip }}{% else %}*{% endif %}:{{ phppgadmin_vhostport }}>
  7. ServerName {{ phppgadmin_vhostname }}
  8. DocumentRoot /usr/share/phppgadmin
  9. DirectoryIndex index.php
  10. {% if http_auth_phppgadmin %}
  11. <Location />
  12. AuthType basic
  13. AuthName "Restricted Access"
  14. AuthUserFile /etc/apache2/auth_admin
  15. Require valid-user
  16. </Location>
  17. {% endif %}
  18. <Directory /usr/share/phppgadmin>
  19. Require all granted
  20. </Directory>
  21. <IfModule mod_php5.c>
  22. php_admin_value max_execution_time 240
  23. php_admin_value upload_max_filesize 128M
  24. php_admin_value post_max_size 128M
  25. </IfModule>
  26. <IfModule php7_module>
  27. php_admin_value max_execution_time 240
  28. php_admin_value upload_max_filesize 128M
  29. php_admin_value post_max_size 128M
  30. </IfModule>
  31. {% if with_fpm|bool %}
  32. Include conf-available/fpm-pool.conf
  33. {% endif %}
  34. LogLevel warn
  35. CustomLog ${APACHE_LOG_DIR}/pga.access.log combined
  36. ErrorLog ${APACHE_LOG_DIR}/pga.error.log
  37. </VirtualHost>