I rebooted my server and got 404 not found nginx page when trying to access my website. Before the reboot it was working fine, but i dont know what happened.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Nginx responds with 404 when the page requested is not found.
It is very unlikely that document roots of websites configured disappeared to cause missing files. However, it is worth checking if the original document root and files are still there.
If the document root of the website still there,
it is likely that a backend service responsible for processing pages for nginx is not running.
Example of such services includes apache, php-fpm, node etc.
It is of course very easy to happen such a case as many people will forget to configure services to start on boot.
So, it is likely that apache, php-fpm or node failed to stat after boot causing such an issue.
if that is the case, start such a service and configure that service to start on boot as below.
centos 6: chkconfig service_name on
centos 7: systemctl enable service_name
Hello,
I would recommend following the steps from this article on how to troubleshoot common Nginx problems:
If you are still seeing the error, feel free to share the output from your logs here so that I could try to further advise.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.