Configuring Webserver on Linux…

Before telling you how to configure Web server Let me introduce what is WebServer.

As name suggest “Server which serves Web Requests”.

In technical terms we can say  A Computer System which process request via http or https, called Webserver.

 

Configure Webserver on LINUX

Please follow Below steps for installing Apache webserver

Their are 2 ways of installing apache webserver

We can install it via Apache Webserver Official Website or Via pre-built rpm available online.

 

 

Installing Via RPM:

  1. Please go to rpmfind website URL eg: https://www.rpmfind.net/linux/rpm2html/search.php?query=httpd 
  2. Download RPM related to your server architecture eg:64 bit etc.
  3. Run command on terminal like rpm –ivh <rpm>
  4. Run  command to check if that get installed or not  —- eg : rpm -qa | grep -i httpd
    httpd-2.4.6-67.el7_4.6.x86_64.
  5. vi pathToInstall/conf/httpd.conf eg: vi /etc/httpd/conf/httpd.conf
  6. After that start service eg : service httpd start

 

Sample httpd.conf file

httpd.conf File

 

Installing Via Apache Website:

  1. Please go to URL http://httpd.apache.org/download.cgi#apache24 Here you will find latest Apache HTTP Server Binaries and tar Files. Its name starts httpd-NN.tar.gz Like Example:  httpd-2.2.34.tar.gz
  2. do gzip -d httpd-2.2.34.tar.gz
  3. tar xvf httpd-2.2.34.tar
  4. ./configure –prefix=pathToInstall
  5. make
  6. make install
  7. vi pathToInstall/conf/httpd.conf
  8.  Start Apache webserver from  pathToInstall/bin/apachectl -k start

 

 

Troubleshooting issue in HTTPD:

You can troubleshoot via logs path ; /etc/httpd/logs/

or <install directory>/logs

Please follow and like us:

Leave a Reply

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