🪶
Networking & Server

Apache HTTP Server

Classic web server (httpd) for websites and apps

🐧 Linux🍎 Mac🪟 Windows📋 Quick reference →
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

What is this?

Apache httpd is a widely used web server for hosting websites and applications.

📁

Config files for Apache HTTP Server

Where to create or edit the main configuration — paths below match the setup steps.

  • /etc/apache2/sites-available/*.conf

    Location: Linux — Debian/Ubuntu

    VirtualHost and module config

  • /etc/httpd/conf.d/*.conf

    Location: RHEL/CentOS

    Site and module snippets

📥

Step 01

Install Apache HTTP Server

(01)Install Apache HTTP Server

Linux
1sudo apt-get install -y apache2
2sudo systemctl enable apache2 && sudo systemctl start apache2
⚙️

Step 02

Configure Apache HTTP Server

(01)Configure Apache HTTP Server

Linux
1sudo nano /etc/apache2/sites-available/myapp.conf
2sudo a2ensite myapp && sudo systemctl reload apache2

Step 03

Verify

(01)Verify installation

Linux
1curl -I http://localhost