When you access a website, you actually access a web server. What is web server? Web server is a program that delivers web pages to you. Web server uses HTTP (Hypertext Transfer Protocol) or HTTPS (Hypertext Transfer Protocol Secure) protocol.
There are many web servers that we can use for our website: Apache, Nginx, Lighttpd, and others. In this tutorial, I am going to show you how to install Apache web server on CentOS 7.
Are you ready? Follow this step:
Execute the following command for installing Apache web server:
yum -y install httpd
After installation process is done, start Apache web server by using this command:
service httpd start
For enabling Apache web server starts at boot, execute this:
systemctl enable httpd
Then access your-centos7-ip-address in your web browser.
Apache web server is running
If you get a page like above picture, it means apache web server works. Do you get nothing?
By default CentOS 7 blocks all incoming traffics, so you have to flush firewall by using this command:
Then try again access your-centos7-ip-address in your web browser. You must get the page.