Apache config security checker
Paste an Apache httpd config and find old SSLProtocol settings, directory listings, TRACE, version disclosure and HTTPS hosts without security headers.
Checked as you type. Nothing you paste leaves this page.
The file is read in your browser. It is not uploaded.
Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.
How to use the apache config security checker
- Paste httpd.conf, apache2.conf or a virtual host file, drop it, or load the example.
- Fix the SSLProtocol line first if it is flagged.
- Add the missing headers with mod_headers inside the HTTPS virtual host.
- Run apachectl configtest before you reload.
About this tool
Apache httpd has been configured the same way for two decades, and many configurations in use were written for a different threat model. SSLProtocol all -SSLv3 looked careful in 2014 and still enables TLS 1.0 and 1.1. Options Indexes turns every folder without an index file into a public listing.
This checker reads the directives and the sections they sit in. It works out which protocols an SSLProtocol line really leaves on, following the plus and minus syntax of mod_ssl, and reports old ones. It reports Indexes (also when it arrives through Options All), TraceEnable on, AllowOverride All, ServerTokens and ServerSignature settings that publish the version, and HTTPS virtual hosts that send no HSTS, nosniff or frame protection header.
Server-wide defaults such as a missing ServerTokens are reported only when the file looks like a main configuration, so a pasted virtual host is not blamed for them. Included files are not followed, so settings that live in conf-enabled or mods-enabled are invisible here, and the rules do not replace a review.
Sources
Questions
SSLProtocol -all +TLSv1.2 +TLSv1.3. The keyword all turns on every protocol the OpenSSL build supports, so each old one has to be removed by name, and a line such as all -SSLv3 leaves TLS 1.0 and 1.1 on.
Use Options -Indexes in the Directory block, or leave Indexes out of an Options line that lists values without plus and minus signs. Note that Options All includes Indexes.
Set ServerTokens Prod so the Server header says only "Apache", and ServerSignature Off so generated pages carry no footer. Both go in the main server configuration. Hiding the version does not fix a vulnerable server, but it stops scanners from matching you by version string.
It widens the damage of another flaw. With it, a .htaccess file can change authentication, rewriting and handlers, so anyone who can write a file into the web root can reconfigure that part of the site. Use AllowOverride None and put the rules in the server configuration where you can.