TL;DR for how to install apache on CentOS server:
[root@bluegrid-edu ~]# yum install httpd
Specification:
OS Version: CentOs 8.2 x64
OS Version: CentOs 8.2 x64
Full Read
Apache Web server is handled under httpd
service in the RHEL operating systems. Same with CentOS. Let's dive right into it!
Update the operating system:
[root@bluegrid-edu ~]# yum update
Install the httpd
service:
[root@bluegrid-edu ~]# yum install httpd
Start the httpd service:
[root@bluegrid-edu ~]# systemctl start httpd
Check the status of httpd service:
[root@bluegrid-edu ~]# systemctl status httpd
Enable the service in systemctl to auto-start on system boot:
[root@bluegrid-edu ~]# systemctl enable httpd
Test the http response:
[root@bluegrid-edu ~]# curl -I http://bluegrid.io
HTTP/1.1 200 OK
Date: Fri, 31 Jul 2020 16:54:25 GMT
Server: Apache/2.4.37 (centos)
Last-Modified: Fri, 31 Jul 2020 16:54:22 GMT
ETag: "0-5abbfa40a7383"
Accept-Ranges: bytes
Content-Type: text/html; charset=UTF-8
Related article: How to use .htaccess with the Apache Webserver