404 error on Apache

Linode Staff

When trying to login to my site I'm getting a 404 error. What can I do to troubleshoot this?

1 Reply

  1. A 404 error might be caused by a virtualhost configuration issue. (For example: if the document root is set to a directory that doesn't exist.) You can check your Apache configuration file for errors using the below:

    Debian and Ubuntu:

    apache2ctl -t

    Fedora and CentOS:

    httpd -t
  2. If you see the below failure in your logs, check on the status of Apache:

    [FAILED] Failed to start The Apache HTTP Server.

    Check Apache status:

    systemctl status apache2.service

    View the associated logs:

    journalctl -xe
  3. As for other general troubleshooting steps, if you recently made changes to your server that don't seem to be taking effect, it might help to restart or reload Apache:

    Debian and Ubuntu:

    /etc/init.d/apache2 reload

    Fedora and CentOS:

    /etc/init.d/httpd reload
  4. Check your Apache logs to see if they point to anything specific. You can use tail -f to live-reload your error logs:

    tail -f /var/log/apache2/error.log

For more general troubleshooting steps, please see:



Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct