How to Set Up Apache Web Server
How to Set Up Apache Web Server
Ubuntu / Debian
apt update && apt upgrade -y
apt install apache2 -y
systemctl start apache2
systemctl enable apache2
ufw allow 'Apache Full'
ufw enable
Visit http://YOUR_SERVER_IP to see the Apache default page. Place website files in /var/www/html/.
CentOS / AlmaLinux / Rocky Linux
dnf install httpd -y
systemctl start httpd
systemctl enable httpd
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload