pga_vhost.j2 831 B

123456789101112131415161718192021222324252627282930
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. # Nginx vhost for phppgadmin
  6. server {
  7. listen {%if phppgadmin_vhostip %}{{ phppgadmin_vhostip }}:{% endif %}{{ phppgadmin_vhostport }};
  8. server_name {{ phppgadmin_vhostname }};
  9. access_log /var/log/nginx/pma.access.log;
  10. error_log /var/log/nginx/pma.error.log;
  11. root /usr/share/phppgadmin;
  12. index index.php;
  13. try_files $uri $uri/ /index.php;
  14. {% if http_auth_phppgadmin %}
  15. auth_basic "Restricted Access";
  16. auth_basic_user_file /etc/nginx/auth_admin;
  17. {% endif %}
  18. client_max_body_size 128m;
  19. location ~ \.php(/|$) {
  20. include fastcgi_pass_fpm;
  21. fastcgi_param PHP_ADMIN_VALUE "max_execution_time=240\nupload_max_filesize=128M\npost_max_size=128M";
  22. }
  23. }