Apache HTTP Server guide: install, configure, secure, tune

Updated November 2026

These guides cover the Apache HTTP Server 2.4, the current branch, with httpd 2.4.69 as the latest release as of November 2026. Every example is written for 2.4 and shows the Debian/Ubuntu and RHEL/Fedora variants where they differ. If you are new to Apache, follow the path below in order. If you are fixing a problem, jump straight to the guide you need.

Where to start

  1. Install. Get httpd from your distribution’s packages, so security fixes arrive with normal system updates: Install Apache.
  2. Understand the configuration. Learn where the files are, how sections and the merge order work, and the test-then-reload routine (apachectl configtest, then a graceful reload): Configuration basics.
  3. Add your sites. One <VirtualHost> per domain, a catch-all default, separate logs: Virtual hosts.
  4. Decide about .htaccess. Use per-folder files only when you cannot edit the main configuration: .htaccess files.
  5. Secure it. Turn on HTTPS, work through the hardening checklist, and protect private areas with access control and passwords. Keep the server patched; the Security section explains how.
  6. Tune it. Choose and size the MPM in Performance tuning, then add compression and caching and HTTP/2.
  7. Keep it running. Read your logs, watch server status, and use Troubleshooting errors when something breaks.

If you already run Apache

How these guides are written

Every directive, default and path is checked against the Apache httpd 2.4 documentation and the distributions’ own packages and documentation, which are listed under Sources on each page. Commands that need root use sudo. Old 2.2 syntax appears only where it is labeled as old syntax you may still see. This site is independent and is not affiliated with the Apache Software Foundation. For the reference manual and downloads, go to httpd.apache.org.

All guides

Sources