I'm following a guide to set up a ubuntu VPS as a nginx webserver for wordpress.
When setting up Nginx and PHP the guide I'm using suggests I uncomment this line in /etc/nginx/sites-available/default
:
fastcgi_pass 127.0.0.1:9000;
Having done this, although the server's welcome page works, I get a 502 bad gateway error when going to a php file I created (containing phpinfo)
However, when I uncomment this line instead:
fastcgi_pass unix:/var/run/php5-fpm.sock;
The php file appears to load successfully
Can anyone explain what each line does and why the one I used works but the one in the tutorial does not?