Apache#

Some useful links to explain the concepts of Apache

Concepts#

Information about MPM (Multi Processing Modules)#

_images/web-servers-apache-mpms.png

Configuration#

Virtual Hosting#

HTaccess checks and guides#

Tuning & Hardening#

Apache Server Status Page#

Other Optimizations#

Troubleshooting & Log Parsing#

Find Original IPs of sites using CDNs like Cloudflare#

Levels of traffic with Apache access log#

Commands#

  • Find hits by IP to server from access log in ascending order

1sudo tail -n 10000 <path-to-log-file> | awk '{print $2}' | sort | uniq -c | sort -n
2sudo grep 'text' <path-to-access-log> | cut -d' ' -f1 | sort | uniq -c | sort -r
  • Finding connections to all server IPs source/destination & sorting in ascending order

1sudo netstat -antulp | awk '{print $4}' | cut -d":" -f1 | sort | uniq -c | sort -n
2sudo netstat -antulp | awk '{print $5}' | cut -d":" -f1 | sort | uniq -c | sort -n