404 not found nginx

Posted February 2, 2020 12.1k views
NginxPHP Frameworks

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.

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.

Submit an Answer
2 answers


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.


  • Hi, i followed the post and when i run ‘nginx -t’ i get

    nginx: [warn] server name " has suspicious symbols in etc/nginx/sites-enabled/default:38

    I’ve already tried to modify it but always get the same answer.

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