Skip to main content

๐Ÿ› ๏ธ Apache Installation Guide

Apache HTTP Server can be installed easily on most operating systems. Below are the steps for common platforms.


๐Ÿง Ubuntu/Debianโ€‹

sudo apt update
sudo apt install apache2 -y

# Enable SSL and Headers modules for HTTPS support
sudo a2enmod ssl
sudo a2enmod headers
sudo systemctl reload apache2

โœ… After installation:

sudo systemctl status apache2
  • ๐Ÿ”„ Restart: sudo systemctl restart apache2
  • โ›” Stop: sudo systemctl stop apache2
  • โ–ถ Start: sudo systemctl start apache2

๐Ÿงฑ CentOS/RHEL/Fedoraโ€‹

sudo dnf install httpd -y

Or, if using older versions:

sudo yum install httpd -y

โœ… After installation:

sudo systemctl enable httpd
sudo systemctl start httpd

๐Ÿ macOS (via Homebrew)โ€‹

brew install httpd

To start the service:

sudo apachectl start

๐Ÿงช Test Apache: Visit ๐Ÿ‘‰ http://localhost:8080


๐ŸชŸ Windowsโ€‹

  1. ๐Ÿ“ฅ Download from: https://www.apachelounge.com/download/
  2. ๐Ÿ“ฆ Extract and install
  3. โ–ถ Start Apache from Command Prompt:
httpd.exe

๐Ÿ” Test Apacheโ€‹

Open a browser and go to:

http://localhost

โœ… You should see the Apache2 Default Page or "It works!"


๐Ÿ’ก Pro Tip: Use which apache2 or which httpd to check the installation path.