roles/nginx: Fix PHP-FPM socket location on Debian 9

Debian 9 and Ubuntu 16.04 use the same PHP-FPM configuration so we
can make use of that here.
This commit is contained in:
Alan Orth 2017-06-18 11:04:30 +03:00
parent 4f22052afe
commit b2d3984c5a
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ server {
# See: https://httpoxy.org/
fastcgi_param HTTP_PROXY "";
{% if ansible_distribution_version | version_compare('16.04', '==') %}
{# As of Ubuntu 16.04 and Debian 9, the PHP-FPM configs are the same #}
{% if (ansible_distribution == 'Ubuntu' and ansible_distribution_version | version_compare('16.04', '==')) or (ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '==')) %}
fastcgi_pass unix:/run/php/php7.0-fpm-{{ domain_name }}.sock;
{% else %}
fastcgi_pass unix:/var/run/php5-fpm-{{ domain_name }}.sock;