Verify your Apache HTTP Server configuration

Apache HTTP Server issues may also be a result of a misconfigured Apache httpd.conf configuration file. Going over the whole configuration file searching for typos may be a cumbersome task, but thankfully Apache provides a way to scan your httpd.conf file for any syntax errors. This can be done by using the configtest tool from the apachectl program. For Apache on Unix systems you would need to execute apachectl –configtest from the command line and for Apache on Windows systems you would need to first navigate to the Apache ‘bin’ directory from the command line and then execute httpd.exe –t.

apache tips fig2

Figure 1 – Apache  HTTP Server found a syntax error on the ServerTokens directive

In the above example this tool found a syntax error on line 560 of the httpd.conf file. It appears that the ServerTokens directive was misspelled with an extra ‘t’ present at the beginning of the ‘Tokens’ part. Other issues may remain after this is solved so it’s recommended that you rerun the configtest tool after correcting the issue and restarting Apache.

Use the latest version of Apache HTTP Server

Old versions of Apache HTTP Server may contain bugs which could be causing the issues you are experiencing. Furthermore, using an outdated version of Apache may also lead to security vulnerabilities. A list of vulnerabilities and bugs in previous versions of Apache can be found here and the latest version of Apache can be downloaded from here.


SHARE THIS POST
THE AUTHOR
Acunetix

Acunetix developers and tech agents regularly contribute to the blog. All the Acunetix developers come with years of experience in the web security sphere.