roles/nginx: Fix for path to PHP-FPM socket on Ubuntu 16.04

This commit is contained in:
Alan Orth 2016-04-22 18:19:30 +03:00
parent 4a99c73d62
commit 0bed8e4c0b
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -54,7 +54,11 @@ server {
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_split_path_info ^(.+\.php)(/.+)$;
{% if ansible_distribution_version == '16.04' %}
fastcgi_pass unix:/run/php/php7.0-fpm-{{ domain_name }}.sock;
{% else %}
fastcgi_pass unix:/var/run/php5-fpm-{{ domain_name }}.sock;
{% endif %}
fastcgi_index index.php;
# set script path relative to document root in server block
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;