๐ ๏ธ 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โ
- ๐ฅ Download from: https://www.apachelounge.com/download/
- ๐ฆ Extract and install
- โถ 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.