apache web server in Linux
apache web server in linux

apache web server in Linux

apache web server in Linux- apache is a free and open source web server that provides content to the client over the Internet as a client form of 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 server 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 apache package in Linux or other Linux related operating system.

# dnf install httpd -y

Install HTTP package in apache web server

Note : this article I am login with root , then the # sign appears in the terminal and I do not need to use sudo command in 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 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 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 any one text editor. Like in the below step we have used 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 near by line number 89 and search ServerAdmin and change email address According to your Server organization requirement .

ServerAdmin root@siyaram.com

Line Number 98 (near by) and and change your server name .

ServerName YourServerName:80 ( change your Server Name )

after editing the configuration fie 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 web server service status

#systemctl status httpd

Reload Apache web service

#systemctl reload httpd

firewall setting

If firewall service turned on in your system then you can allow http apache 80/TCP web server through firewall . You can use the below given steps for setting of 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 the web server ip address or hostname in its URL bar.
If your webserver is properly configured and all web server related service are running, you will get a test page of the web server. As you can see below

 Open  test  web page in apache web server

Create a HTML test page and access to it from client PC with web browser.

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

[root@siyaram ~]# vim index.html

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

save and exit

Conclusion

In this tutorials we Learn About How to Install and Configure Apache http web server in Linux and also test page from client Browser.

Through this article, we have tried to explain apache web server 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.

How to install MySQL on Windows 10
Here in this blog, we are going to share how to install …
Latest Tech News Website and Best Tech news Blog
So, here we are reviewing some of the best tech news sites. …
Linux News Site
We have reviewed and compared some of the top Linux News sites …
How to Choose The Best Domain Registrar
Best Domain Registrar There are tons of domain registration websites to register …

Also Look This

All technology news and blog in Hindi

All Product review

Latest fashion Product