pga_vhost.j2 991 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. {% if ansible_controlled is defined and ansible_controlled != "" %}
  2. #
  3. # {{ ansible_controlled }}
  4. #
  5. {% endif %}
  6. # Nginx vhost for phppgadmin
  7. server {
  8. listen {%if phppgadmin_vhostip %}{{ phppgadmin_vhostip }}:{% endif %}{{ phppgadmin_vhostport }};
  9. server_name {{ phppgadmin_vhostname }};
  10. access_log /var/log/nginx/pma.access.log;
  11. error_log /var/log/nginx/pma.error.log;
  12. root /usr/share/phppgadmin;
  13. index index.php;
  14. try_files $uri $uri/ /index.php;
  15. {% if phppgadmin_http_auth %}
  16. auth_basic "Restricted Access";
  17. auth_basic_user_file /etc/nginx/auth_admin;
  18. {% if phppgadmin_http_whitelist_ip|length > 0 %}
  19. {% for ip in phppgadmin_http_whitelist_ip %}
  20. allow {{ ip }};
  21. {% endfor %}
  22. deny all;
  23. satisfy any;
  24. {% endif %}
  25. {% endif %}
  26. client_max_body_size 128m;
  27. location ~ \.php(/|$) {
  28. include fastcgi_pass_fpm;
  29. fastcgi_param PHP_ADMIN_VALUE "max_execution_time=240\nupload_max_filesize=128M\npost_max_size=128M";
  30. }
  31. }