
There's more...
Take care when copying and pasting any configuration files. It's very easy to miss something and have one thing slightly different in your environment, which will cause issues with the website working as expected. Here's a quick lookup table of various other issues which you may come across:
Error
What to check
502 Bad Gateway
File ownership permissions for the PHP-FPM socket file
404 File Not Found
Check for the missing index index.php directive
403 Forbidden
Check for the correct path in the root directive and/or check for correct file permissions
Your error log (defaults to /var/log/nginx/error.log) will generally contain a lot more detail regarding the issue you're seeing compared with what's displayed in the browser. Make sure you check the error log if you receive any errors.