diff --git a/roles/nginx/templates/vhost.conf.j2 b/roles/nginx/templates/vhost.conf.j2 index 34d946e..239fcc2 100644 --- a/roles/nginx/templates/vhost.conf.j2 +++ b/roles/nginx/templates/vhost.conf.j2 @@ -56,6 +56,11 @@ server { #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini fastcgi_split_path_info ^(.+\.php)(/.+)$; + # Protect against "HTTPoxy" vulnerability in PHP libraries + # See: https://www.nginx.com/blog/mitigating-the-httpoxy-vulnerability-with-nginx/ + # See: https://httpoxy.org/ + fastcgi_param HTTP_PROXY ""; + {% if ansible_distribution_version == '16.04' %} fastcgi_pass unix:/run/php/php7.0-fpm-{{ domain_name }}.sock; {% else %}