Lab 04: Basic Apache Hardening - squatchulator/Tech-Journal GitHub Wiki
Remove Server Version Banner:
cd /etc/httpd/confnano httpd.confand append the following directive:ServerTokens ProdServerSignature Off
- Restart apache
Disable Directory Browser Listing:
mkdir /var/www/html/test- Add two text files containing the words
hiandhello
- Add two text files containing the words
- Try visiting server IP at:
http://192.168.1.1/test/and directory listing should be there cd /etc/httpd/confandnano httpd.conf- Search for
/var/www/htmldirective and changeOptionsto None - Restart apache, and directory listing should be blocked.
Disable Trace HTTP Request
- Install telnet with
yum -y install telnet cd /etc/httpd/confandnano httpd.conf- Append the following directive:
TraceEnable off
- Append the following directive:
- Make a trace request:
telnet localhost 80TRACE / HTTP/1.1Host: test
- Restart apache; telnet requests should be blocked.