apache web server in Linux
apache web server in linux

apache web server in Linux

an apache web server in Linux- apache is a free and open-source web server that provides the content to the client over the Internet as a client form of a webpage. The apache web server is a very popular web server among all servers. About 52% of web servers are using apache web server IT industry.

In this Tutorial, We Learn About apache web servers in Linux. Apache is an open-source web server it’s maintained and developed by the Apache Software Foundation. The Apache web server is available by default in the distribution

With the below command, you can install the apache package in Linux or another Linux-related operating system.

# dnf install httpd -y

Install HTTP package in apache web server

Note: In this article, I am login with root, then the # sign appears in the terminal and I do not need to use sudo command at the starting of the command. If you are logged in with a normal user, then you will see the $ sign and in this case, you will have to apply the Sudo command.

Check Apache version

If the package of apache is successfully installed in your system, you can check your version

#httpd -v #httpd –version

Configure httpd Apache

In the step below, you can edit the apache web server main configuration file. This is the main configuration file of the Apache web server. You have to open this configuration file with the help of anyone text editor. Like in the below step we have used a vim text editor and follow some of the steps given below.

Change your server name According to your server name.

[root@siyaram ~]# vim /etc/httpd/conf/httpd.conf

go to nearby line number 89 and search ServerAdmin and change email address According to your Server organization requirement.

ServerAdmin root@siyaram.com

Line Number 98 (nearby) and change your server name.

ServerName YourServerName:80 ( change your Server Name )

after editing the configuration file of the apache web server is done as per your requirement, you can save and exit from the configuration file.

start and check the apache web server service

#systemctl start httpd

View Apache webserver service status

#systemctl status httpd

Reload Apache web service

#systemctl reload httpd

firewall setting

If firewall service is turned on in your system then you can allow HTTP apache 80/TCP web server through the firewall. You can use the below-given steps for the setting of the firewall.

# firewall-cmd –add-service=http –permanent

# firewall-cmd –reload

Allow http service through Firewall in http apache web server

Test apache web server

If all the above steps are followed well and there is no error in the configuration time and service start time, then you can check the apache web server, for this process you can open web browsers and put the webserver IP address or hostname in its URL bar.
If your web server is properly configured and all web server-related services are running, you will get a test page of the webserver. As you can see below

 Open  test  web page in apache web server

Create an HTML test page and access it from the client’s PC with a web browser.

[root@siyaram ~]# cd /var/www/html

[root@siyaram ~]# vim index.html

        <title>test Page</title>
        <p>This is simple http website.</p>

save and exit


In these tutorials, we Learn About How to Install and Configure Apache HTTP web server in Linux and also test the page from the client Browser.

Through this article, we have tried to explain the apache webserver well with theory and screenshots, if there is any doubt related to it, you can share your doubt feedback with us through the comments, your feedback in improving our upcoming article.

Also, Look This

All technology news and blog in Hindi

All Product review

Latest fashion Product

Rate this post