1. 502 appears, first check the nginx error log
2. connect() appears
to unix:/var/run/php5-fpm.sock
Solution:
Put /etc/php5/fpm/pool.d/www.conf in
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
onThe above introduces the solution to the 502 bad gateway problem in ubuntu+nginx, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.