I just upgraded nginx to 1.11.13. After the upgrade I got a 502 gateway error. I restarted nginx. This didn't help. I ended up restarting php-fpm in order to fix the 502 gateway error. Do you have to restart php-fpm after a nginx upgrade? Just curious...