{% if ansible_prolog -%} {% from 'templates/ansible/prolog.j2' import prolog with context %} {{ prolog() }} {% endif -%} # Nginx vhost for phppgadmin server { listen {%if phppgadmin_vhostip %}{{ phppgadmin_vhostip }}:{% endif %}{{ phppgadmin_vhostport }}; server_name {{ phppgadmin_vhostname }}; access_log /var/log/nginx/pma.access.log; error_log /var/log/nginx/pma.error.log; root /usr/share/phppgadmin; index index.php; try_files $uri $uri/ /index.php; {% if phppgadmin_http_auth %} auth_basic "Restricted Access"; auth_basic_user_file /etc/nginx/auth_admin; {% if phppgadmin_http_whitelist_ip|length > 0 %} {% for ip in phppgadmin_http_whitelist_ip %} allow {{ ip }}; {% endfor %} deny all; satisfy any; {% endif %} {% endif %} client_max_body_size 128m; location ~ \.php(/|$) { include fastcgi_pass_fpm; fastcgi_param PHP_ADMIN_VALUE "max_execution_time=240\nupload_max_filesize=128M\npost_max_size=128M"; } }