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:
- Please go to rpmfind website URL eg: https://www.rpmfind.net/linux/rpm2html/search.php?query=httpd
- Download RPM related to your server architecture eg:64 bit etc.
- Run command on terminal like rpm –ivh <rpm>
- Run command to check if that get installed or not —- eg : rpm -qa | grep -i httpd
- vi pathToInstall/conf/httpd.conf eg: vi /etc/httpd/conf/httpd.conf
- After that start service eg : service httpd start
Sample httpd.conf file
Installing Via Apache Website:
- 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
- do gzip -d httpd-2.2.34.tar.gz
- tar xvf httpd-2.2.34.tar
- ./configure –prefix=pathToInstall
- make install
- vi pathToInstall/conf/httpd.conf
- 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