Apache's error log is the first place to look; Apache's own documentation calls it the most important log file. If Apache won't start at all, run apachectl configtest: it finds config syntax errors without starting the server. If Apache runs but pages fail, the usual causes are a broken .htaccess file (500 errors), file permissions (403), or something else already using port 80 or 443.
What's the problem
The site won't load, Apache won't start or restart, or pages show 500, 403 or 503 errors from Apache.
Why it happens
- A config syntax error, so Apache refuses to start.
- A broken
.htaccessfile, a common cause of 500 errors, especially on WordPress sites. - Port 80 or 443 already in use by another program, such as Nginx or a second Apache.
- A module that isn't enabled, such as the rewrite module needed for pretty URLs.
- File permissions stopping Apache reading your files (403).
- Apache ran out of workers under load.
How to fix it
- Read the error log. Its location is set by the
ErrorLogline in Apache's configuration; on most Linux servers it's under/var/log/. On shared hosting, find "Error log" in the control panel. - If Apache won't start, run
apachectl configtestand fix the line it reports. - For 500 errors, rename
.htaccesstemporarily to see whether it's the cause. - Check nothing else is using the port (
sudo ss -tlnp | grep ':80'). - Check required modules are enabled, such as
mod_rewrite. - Restart Apache once the config test passes.
What Preventionlabs checks
One click runs the full report on your domain. For this problem it shows whether your site loads, how fast, and where its redirects go; uptime checked every 5 minutes, with an email when the site goes down and when it is back. With Cloudflare connected, it also shows which pages returned server errors (5xx) to visitors, and when; recent deploys and account changes, with their times. It can't log in to your server, so memory, disk and process problems show up in your host's dashboard and logs.
Run your free reportYour first report is free, no card needed. Then A$50 a month, up to 10 domains. Read-only: it never changes anything.
Sources
- Apache HTTP Server: Log Filesofficial docs
This is the place where Apache httpd will send diagnostic information and record any errors that it encounters in processing requests. It is the first place to look when a problem occurs
- Apache HTTP Server: Configuration Filesofficial docs
You can check your configuration files for syntax errors without starting the server by using apachectl configtest or the -t command line option.
- WordPress: Common WordPress errorsofficial docs
The most likely issue is a corrupted .htaccess file.
- Apache HTTP Server: Log Filesofficial docs
The server error log, whose name and location is set by the ErrorLog directive, is the most important log file.
Preventionlabs is independent and not affiliated with Apache. Product names are used only to describe the problem.
← All of Server