Apache Web Server Features
1. Overview
The Apache HTTP Server (Apache Software Foundation, since 1995) is the most widely deployed open-source web server. It is modular, portable (Unix/Windows), multi-threaded, and configurable through plain-text directives, and it supports both static content and dynamic content via CGI/modules and proxying to application servers.
2. Key Configuration Files (Linux layout)
| File / Directory |
Purpose |
httpd.conf (or apache2.conf) |
Main server configuration — global directives, MPM selection, module loading |
conf/extra/httpd-vhosts.conf |
Virtual host definitions (many sites on one server) |
conf/extra/httpd-ssl.conf |
HTTPS (SSL/TLS) virtual host on port 443 |
.htaccess |
Per-directory overrides (auth, rewrite, MIME) — checked at request time |
mime.types / AddType |
File extension → MIME type mapping |
logs/access_log, logs/error_log |
Request logging and error diagnostics |
htdocs/ (DocumentRoot) |
Default directory of served static files |
bin/apachectl, httpd -k start/stop/restart |
Server control script |
3. Major Features
| Feature |
Description |
| Modularity |
Functionality is compiled/loaded as DSO modules (LoadModule) — core is small; add/remove features without recompiling |
| Multiple MPMs |
prefork (process per child), worker (threads), event (async keep-alive) — chosen for the workload |
| Virtual hosting |
Name-based and IP-based — many independent web sites on one machine (<VirtualHost *:80>) |
| Authentication & authorisation |
Basic/Digest auth, .htpasswd, Require user/group, LDAP/OAuth via modules |
| Access control |
Require ip, host allow/deny, URL rewriting gates |
| SSL/TLS (mod_ssl) |
HTTPS on 443, certificates, SNI |
| URL rewriting (mod_rewrite) |
Powerful regex URL manipulation — clean URLs, redirects, gateways |
| CGI / FastCGI / dynamic handlers |
Runs external programs (mod_cgi, mod_fcgid, PHP module) |
| Proxy (mod_proxy) |
Reverse proxy / load balancer to Tomcat, Node, etc. (HTTP, AJP, WebSocket) |
| Compression & caching |
mod_deflate (gzip), mod_cache, mod_expires headers |
| Logging |
Common/combined access log formats, per-vhost logs, error log levels, mod_status server statistics |
| Content negotiation & multi-language |
Serves the variant (language/type) best matching the client's Accept headers |
| Security |
mod_security (WAF), chroot, directory permissions, hotlink protection |
| Portable & free |
Runs on UNIX/Linux/BSD/Windows; open source (Apache Licence 2.0) |