Hero Image

Install Apache HTTP Server on AlmaLinux 9

Install Apache HTTP Server on AlmaLinux 9

Step 1 – Install Apache

dnf install epel-release -y
dnf install -y httpd mod_ssl

Step 2 – Start and enable the service

systemctl enable --now httpd

Step 3 – Open firewall ports

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

Step 4 – Verify

curl -I http://localhost

The main configuration file is /etc/httpd/conf/httpd.conf and virtual-host definitions belong in /etc/httpd/conf.d/.

Apache version

apachectl -v