Apache HTTP Server Installation and Configuration

2 days (16 hours total)


Day 1 – Installation, Core Configuration, Virtual Hosts

1. Apache Architecture

MPMs (event/prefork/worker), request lifecycle, modules, config hierarchy.

2. Installation

Debian/Ubuntu apt, RHEL-based dnf/yum, service management, directory layout (/etc/apache2 vs /etc/httpd).

3. Core Configuration

apache2.conf / httpd.conf, include structure, syntax rules, MPM tuning basics, environment variables.

4. Virtual Hosts

Name-based vhosts, IP-based vhosts, SSL vhosts, separate logs per site, enabling/disabling sites.

5. Modules

Dynamic modules, a2enmod / LoadModule, common modules (ssl, rewrite, proxy, headers, security2).

6. DocumentRoot, Directory Directives

Directory, Location, Files, Options, AllowOverride, Require, per-directory security.


Day 2 – Security, Performance, Logs, Integrations

7. HTTPS & TLS Configuration

Creating certs, Let’s Encrypt, redirect rules, OCSP stapling basics, TLS hardening, HSTS.

8. Authentication & Authorization

Basic auth, digest auth, external authentication, group-based access, htpasswd management.

9. .htaccess Mechanism

Override types, pros/cons, performance impact, security concerns, rewrite rules inside .htaccess.

10. URL Rewriting & Redirects

mod_rewrite, common patterns, canonical redirects, proxying.

11. Monitoring & Logging

Access logs, error logs, log format, log rotation, log-level tuning, troubleshooting with logs.

12. Performance Tuning

KeepAlive, compression, caching, MPM tuning, event-mode optimization, reverse proxy caching basics.

13. Database Integration

PHP-FPM + Apache, CGI alternatives, connecting to MySQL/PostgreSQL via application layer, safe config patterns.

14. Hardening & Defense Mechanisms

mod_security basics, request filtering, limiting methods, hiding server tokens, rate limiting via mod_ratelimit.

15. Integration with FTP Server

Passive/active ports, vsftpd or proftpd setup, linking FTP upload dirs to DocumentRoot, permission model.