How to Install Apache Web Server on CentOS 8 / RHEL 8

0
690

The Apache HTTP Server is free and open-source platform and is developed and maintained by an open community of developers Apache Foundation. The vast majority of Apache HTTP Server instances run on a Linux distribution but current versions also run on Microsoft Windows OpenVMS nd a wide variety of Unix-like systems.

Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from authentication schemes to supporting server-side programming languages such as Perl, Python, Tcl and PHP. Popular authentication modules include mod_access, mod_auth, mod_digest, and mod_auth_digest, the successor to mod_digest.

Installing Apache Web Server

In this very article, we gonna explain how to install and manage the Apache webserver on CentOS 8.

Now install Apache webserver by running the following command.

dnf install httpd

After installation we can verify the version of Apache by running the following command.

rpm -qi httpd

Now start the Apache httpd web service by running the following command.

systemctl start httpd

To make sure the service is up and running.

systemctl status httpd

As you can see the Apache web service is in running state.

Now make sure you have enabled port 80 in Firewall. Use following command to add in the Firewall.

firewall-cmd --permanent --add-port=80/tcp

After adding port in firewall use following command to reload it.

firewall-cmd --reload

Now to make sure if Apache web server is running you can request sample page from Apache by browsing your server’s IP address or also by your domain name.

http://yourserver-ip or domain-name

Also you can get your server IP by running the following command.

curl ifconfig.me

Now when you browse your server’s IP address, you should get the following default Apache web page.


That’s about it.

LEAVE A REPLY

Please enter your comment!
Please enter your name here