TL;DR for how to install apache on CentOS server:
[root@bluegrid-edu ~]# yum install httpdOS 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 updateInstall the httpd service:
[root@bluegrid-edu ~]# yum install httpdStart the httpd service:
[root@bluegrid-edu ~]# systemctl start httpdCheck the status of httpd service:
[root@bluegrid-edu ~]# systemctl status httpdEnable the service in systemctl to auto-start on system boot:
[root@bluegrid-edu ~]# systemctl enable httpdTest the http response:
[root@bluegrid-edu ~]# curl -I https://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-8Related article: How to use .htaccess with the Apache Webserver