Install Apache on CentOS 8
Last updated on: 2020-07-28
Authored by: Rackspace Support
The Apache® HTTP Server, colloquially called Apache, is a free and open-source cross-platform web server software. Apache is an extremely popular web service that operates a large portion of the websites on the internet. This article describes how to install Apache and open your server’s firewall to allow web traffic through.
Prerequisites
You need a Linux®-based server running CentOS® 8.
Install Apache
Perform the following steps to install Apache:
-
Run the following command to install the Apache web service, which serves as a base for your application:
dnf -y install @httpd
-
Run the following commands to configure Apache to start on boot and update the software firewall:
systemctl enable --now httpd firewall-cmd --add-service={http,https} --permanent firewall-cmd --reload
You should now be able to navigate your server’s IP address in a browser and see the Apache test page to confirm you’ve configured the server correctly. This page also displays useful information to configure Apache to serve your custom website or application.