This morning, when I SSHed into my droplet, it said that there was a new version of Ubuntu available, so I decided to upgrade. Everything seemed to go well and I didn’t overwrite any files that were locally modified (like /etc/nginx/sites-available/default).
After the upgrade, when trying to visit my site, I got a 404 error from nginx. I tried restarting nginx, PHP and MySQL, without success. I also tried apt-get update and apt-get update --fix-missing, but also without success.
Any ideas on what might be causing it and how to remediate it?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Try to uncomment the following lines in /etc/php5/fpm/pool.d/www.conf
listen.owner = www-data listen.group = www-data listen.mode = 0660
Then restart php-fpm with sudo service php5-fpm restart
Have you reviewed the error log file for NGINX?
Use the following to check it out: sudo cat /var/log/nginx/error.log
Roman
Click below to sign up and get $100 of credit to try our products over 60 days!
Hi there! I guess by now you had already crossed by a solution to this. Anyway, I wanted to drop this quick solution that I found, in case another person gets in the same trouble. See what errors nginx are displaying with: tail -f /var/log/nginx/error.log
When I had the same problem as you have, it turned out it was nginx not having permission to access to /var/run/php5-fpm.sock and by so, it couldn’t load my PHP based websites. I changed the permissions to 666 and it worked perfectly.
This post saved me: http://ubuntuforums.org/showthread.php?t=2231276
Cheers,