404 error on Apache
When trying to login to my site I'm getting a 404 error. What can I do to troubleshoot this?
1 Reply
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 -tFedora and CentOS:
httpd -tIf 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.serviceView the associated logs:
journalctl -xeAs 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 reloadFedora and CentOS:
/etc/init.d/httpd reloadCheck your Apache logs to see if they point to anything specific. You can use
tail -fto live-reload your error logs:tail -f /var/log/apache2/error.log
For more general troubleshooting steps, please see:
https://www.linode.com/docs/troubleshooting/troubleshooting-common-apache-issues/