Wednesday, August 24, 2016

Basic config of Apache Web Server

The Apache HTTP Server, commonly referred to as Apache , is a web server software program notable for playing a key role in the initial growth of the World Wide Web.In 2009, it became the first web server software to surpass the 100 million website milestone. Apache was the first viable alternative to the Netscape Communications Corporation web server (currently named Oracle iPlanet Web Server). Typically Apache is run on a Unix-like operating system,and was developed for use on Linux.

Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. The application is available for a wide variety of operating systems, including Unix, FreeBSD, Linux, Solaris, Novell NetWare, OS X, Microsoft Windows,OS/2, TPF, and eComStation. Released under the Apache License, Apache is open-source software.
Apache was originally based on NCSA HTTPd code. The NCSA code has since been removed from Apache, due to a rewrite.
Since April 1996 Apache has been the most popular HTTP server software in use. As of December 2012 Apache was estimated to serve 63.7% of all active websites and 58.49% of the top servers across all domains.

1. check the rpm and dependency need to install apache:-
[root@base html]# yum search httpd
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
========================================================================== N/S Matched: httpd ==========================================================================
httpd.x86_64 : Apache HTTP Server
httpd-devel.i686 : Development interfaces for the Apache HTTP server
httpd-devel.x86_64 : Development interfaces for the Apache HTTP server
httpd-manual.noarch : Documentation for the Apache HTTP server
httpd-tools.x86_64 : Tools for use with the Apache HTTP Server
mod_dav_svn.x86_64 : Apache httpd module for Subversion server
mod_dnssd.x86_64 : An Apache HTTPD module which adds Zeroconf support

Name and summary matches only, use "search all" for everything.

2. Install and resolve the dependency using yum:-
[root@base ~]# yum install httpd*

3. check installed packages:-
[root@base ~]# rpm -qa |grep httpd
httpd-tools-2.2.15-15.el6_2.1.x86_64
httpd-devel-2.2.15-15.el6_2.1.x86_64
httpd-manual-2.2.15-15.el6_2.1.noarch
httpd-2.2.15-15.el6_2.1.x86_64

4. check all the configuration file and module installed:-
[root@base ~]# rpm -ql httpd-2.2.15-15.el6_2.1

5. creating a new web page:-
[root@base ~]# cd /var/www/html/
vim index.html
hi this is a test page
wq! (save and exit)

6. restart the apache:-
[root@base ~]# /etc/init.d/httpd restart;chkconfig httpd on

7. now open your broweser and hit url:-
http://localhost or http://192.168.4.1

this will open you default test page

No comments:

Post a Comment