How to install Apache Web Server on CentOS 7

CentOS Tutorial–CentOS is a great operating system for server. On this quick tutorial, I am going to show you how to install and configure Apache web server on CentOS 7. At the end, you will have a fully working web server on CentOS 7. I assume you have a fresh install of CentOS 7. I recommend you to install the core only, without any desktop environment.

Steps to install Apache Web Server on CentOS 7

Step 1. Install Apache

Execute the following command to install apache web server.

Example:

Type y to confirm the installation.

Step 2. Configure httpd

Edit the file /etc/httpd/conf/httpd.conf using nano or vim.

Add the following lines at the end of the file:

ServerTokens Prod
KeepAlive On

Close and save the file

Step 3. Configure firewalld

We need to configure the firewall to allow http traffic. Use this command instead

Make sure it returned “success”.

Step 4. Start apache and enable during startup

Step 5. Test it out

Type the server ip address on a web browser from other computer. You should see the default test page shown on your web browser. This means our web server is up and running.

 

Ariel

Leave a Reply

Your email address will not be published. Required fields are marked *