This article shows common errors that were seen on Apache web servers.

Apache Error Categories

Errors can generally be assigned one of the following categories.

Client-Side Errors (400 Series)

  • 404 Not Found: The most common error indicates that the requested resource is not available on the server.
  • 403 Forbidden: Access to the requested resource is denied for some reason.
  • 400 Bad Request: The request cannot be processed due to bad syntax.
  • 401 Unauthorized: Authentication is required and has failed or not been provided.

Server-Side Errors (500 Series)

  • 500 Internal Server Error: A generic error message for unexpected conditions.
  • 502 Bad Gateway: The server received an invalid response from the upstream server.
  • 503 Service Unavailable: The server is currently unavailable (overloaded or down).
  • 504 Gateway Timeout: The upstream server failed to send a request in the time allowed.

Redirection Messages (300 Series)

  • 301 Moved Permanently: The requested resource has been moved permanently to a new location.
  • 302 Found: The resource is temporarily located at a different URI.

Configuration Errors

  • Syntax error in Apache configuration files: Often caused by incorrect syntax or typos.
  • Module loading errors: Errors related to loading Apache modules.

Connection Errors

  • Connection refused or timed out: Indicates issues with network connectivity or server overload.
  • SSL/TLS Errors: Problems related to secure connections, like expired certificates.

File and Directory Access Errors

  • .htaccess errors: Issues with the configuration in .htaccess files.
  • Permission denied errors: Problems with file or directory permissions.

Log File Errors

  • Errors related to writing to or accessing the server log files.

Resource Limit Errors

  • Errors related to exceeding memory or CPU limits.

Compatibility Issues

  • Errors arise from incompatibilities between software versions or modules.

Miscellaneous Errors

  • Various other errors don’t fit neatly into the above categories.

For a more specific and detailed list, you must consult the Apache server documentation, community forums, or error logs on an Apache system. Additionally, Debian, Ubuntu, and CentOS might have unique configurations and system dependencies that can lead to specific errors. Remember, the exact error messages and their frequency can vary based on the server configuration, the version of Apache and the operating system, and the specific use cases of the server.

Certainly! I’ll provide examples for each category mentioned and typical scenarios where you might encounter these error messages on Apache web servers.

1. Client-Side Errors (400 Series)

404 Not Found

  • Example: 404 Not Found: The requested URL /page.html was not found on this server.
  • Scenario: A user requests a webpage or resource that doesn’t exist on the server.

403 Forbidden

  • Example: 403 Forbidden: You don’t have permission to access /directory/ on this server.
  • Scenario: A user tries to access a restricted directory or file.

400 Bad Request

  • Example: 400 Bad Request: Your browser sent a request that this server could not understand.
  • Scenario: A malformed request is sent by the client, possibly due to bad syntax.

401 Unauthorized

  • Example: 401 Unauthorized: This server could not verify that you are authorized to access the document requested.
  • Scenario: A user tries to access a resource that requires authentication without providing valid credentials.

2. Server-Side Errors (500 Series)

500 Internal Server Error

  • Example: 500 Internal Server Error: The server encountered an internal error or misconfiguration and was unable to complete your request.
  • Scenario: General catch-all error when the server encounters an unexpected condition.

502 Bad Gateway

  • Example: 502 Bad Gateway: The proxy server received an invalid response from an upstream server.
  • Scenario: Apache is configured as a reverse proxy and gets an invalid response from the upstream server.

503 Service Unavailable

  • Example: 503 Service Unavailable: The server is temporarily unable to service your request due to maintenance downtime or capacity problems.
  • Scenario: The server is overloaded or under maintenance.

504 Gateway Timeout

  • Example: 504 Gateway Timeout: The gateway did not receive a timely response from the upstream server.
  • Scenario: A request to an upstream server times out.

3. Redirection Messages (300 Series)

301 Moved Permanently

  • Example: 301 Moved Permanently: The document has moved here (URL).
  • Scenario: The resource the user requested has a new permanent URI.

302 Found

  • Example: 302 Found: The document has been temporarily moved to here (URL).
  • Scenario: The resource the user requested is temporarily located at a different URI.

4. Configuration Errors

Syntax error in Apache configuration files

  • Example: Syntax error on line 45 of /etc/apache2/apache2.conf: Invalid command ‘Order’, perhaps misspelled or defined by a module not included in the server configuration
  • Scenario: Incorrect syntax or directive in the Apache configuration file.

Module loading errors

  • Example: Cannot load module mod_ssl.so into server: The specified module could not be found.
  • Scenario: Apache fails to load a specified module, possibly due to an incorrect file path or missing dependencies.

5. Connection Errors

Connection refused or timed out

  • Example: Connection refused: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
  • Scenario: Apache is unable to establish a network connection to a backend service or database.

SSL/TLS Errors

  • Example: SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
  • Scenario: Problems with the SSL certificate or private key configuration.

6. File and Directory Access Errors

.htaccess errors

  • Example: .htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration
  • Scenario: Misconfiguration or syntax errors in .htaccess file.

Permission denied errors

  • Example: (13)Permission denied: file permissions deny server access: /var/www/html/file.php
  • Scenario: Apache lacks the necessary permissions to access a file or directory.

7. Log File Errors

Errors related to log files

  • Example: AH00015: Unable to open logs
  • Scenario: Apache cannot write to or access its log files, possibly due to permission issues.

8. Resource Limit Errors

Exceeding memory or CPU limits

  • Example: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
  • Scenario: Apache hits the maximum number of allowed processes or threads, indicating high traffic or resource limitations.

9. Compatibility Issues

Version incompatibilities

  • Example: mod_python error: Python version mismatch, expected ‘2.6’, found ‘2.7’.
  • Scenario: Incompatibilities between Apache modules and software versions installed on the server.

10. Miscellaneous Errors

Other various errors

  • Example: client denied by server configuration: /var/www/noindex/css/open-sans.css
  • Scenario: This could also be due to various other reasons, such as specific security settings or misconfigurations.

These examples cover a broad range of common issues, but remember that the specific error messages you encounter can vary based on your server’s configuration and the applications you’re running.