Friday, February 17, 2012

Apache Web Server

Apache Web Server

Descriptions and Purpose of lab exercise

  Web servers are perhaps present in every data center of any organization.
  There a few option from which we can choose a web server to host an
  organization's web pages from. Apache is the most popular open-source web
  server. This lab aims at getting the readers to implement the webserver.


Prerequisite
  Should be familiar with the basic principle of server/system administration.
  Additionally, prior exposure to any of these concepts can be helpful:

*  Compilation of native programs (e.g. configuring and compiling c/c++
    applications on UNIX/Linux)
*  HTTP protocol (i.e. the stateless nature of HTTP, the need for session, HTTP
    methods, SSL, etc.)

Introduction

   Apache is the most widely used web server on the internet. Based on HTTP
   daemon (hhtpd), it provides simple and secure access to all types of contents,
   based on the HTTP and HTTPS protocols.
   It is based on the server code developed by National Center for
   Supercomputing Applications (NCSA). As Apache include many patches it
   came to be known as "a patchy" server. Apache web server continues to
   advance the art of the web and provides one of the most stable,secure,robust
   and reliable web servers available. This server is under constant development
   by Apache software foundation (www.apache.org)

Features available in Apache Web Server

Dynamic Shared Object Support
    Apache modules may now be loaded at runtime; this means that modules can
    be loaded into the server process space only when necessary, thus overall
    memory usage by Apache will be significantly reduced. DSO currently is
    supported on FreeBSD, OpenBSD, NetBSD, Linux, Solaris, SunOS, Digital
    UNIX etc.

Support for various platforms
    Apache supports the windows NT and windows 2000 operating systems.
    While Apache many run on windows 95,98 or ME these consumer products
    are never recommended for production environments and their use remains
    experimental. All versions of apache running on windows prior to 1.3.15
    should be considered beta quality release. It also supports the cygwin
    platform for the windows NT and windows 2000 operating system. The
    cygwin version should be considered as stable and reliable. It also supports
    NetWare 5.x and above operating system.

Reliable Piped Logs
    On almost all unix architectures apache now implements "reliable" piped
    logs in mod_log_config. Where reliable means that if the logging child dies
    for whatever reason, apache will recover and respawn it without having to
    restart the entire server. Furthermore if the logging child becomes "stuck"
    and isn't reading its pipe frequently enough apache will also restart it.
    This opens up more opportunities for log rotation, hit filtering real-time
    splitting of multiple vhosts into separate logs, and asynchronous DNS
    resolving on the fly.

Virtual Hosts
    Apache is able to manage websites using a single ip address. This can be
    done by creating multiple virtual hosts on the same web server. We can
    configure virtual hosts for regular websites in the main apache configuration
    file /etc/httd/conf/httpd.conf.

Updating a Home Page

1.  after installing the apache webserver start the apache server with the default
     configuration.
2.  Copy any html file to /var/www/html/index.html
3.  Make any changes to the html file if you want your own information on it.
4.  Using the web browser such as Mozilla firefox Browser to connect to the
      localhost and check whether the same html page is reflected.

Virtual Host

1.  mkdir -p /var/www/virtual
2.  vim /etc/httpd/conf/httpd.conf

       VirtualHost www.example.com:80
        ServerAdmin root@IP Address
        DocumentRoot /var/www/virtual
        ServerName www.example.com
        ErrorLog logs/ error_log
        Customlog logs/ access_log common
        VirtualHost

3.  Line no. 971 Name VirtualHost IPAddress:80
4.  Service httpd restart
5.  chkconfig httpd on
  
     
  

No comments: