Contact Us
   
   
 
   
     
 
     
 

Apache Installation

AddThis Social Bookmark Button          AddThis Feed Button
Print   Email
 

 

Apache Introduction

 

Apache is also known as httpd web server. Unfortunately httpd development was slow down, which result in apache came in market with new tag, new development team. Today apache becomes most powerful web server in the world. It has 60% market share in web servers, survey conducted by source www.netcraft.com . Apache is known for fast, instant web server. Today no web server can beat apache web server. The Apache project was started by NCSA (National center for supercomputing application). Now become part of apache project group. Apache is freely available from apache’s website. This is open source project. Interesting thing, apache is most easily configurable web server.

 


 

Apache’s features

  1. Stable, reliable, fastest web server ever.
  2. Support widely programming languages and scripting languages, php, and cgi etc and many in built modules provided by apache group.
  3. Secure, SSL (secure sockets layer) feature available.
  4. Virtual hosting for many websites run on single IP Address.
  5. Load balancing support with the help of modules. E.g. mod_jk, connectors or ports
  6. Java tomcat support with the help of connector modules.
  7. Apache’s full source code available can further develop and modify according to user’s requirement.
  8. Custom API available for further advance feature.
  9. Access control through .htaccess file and many user permission facilities.
  10. IP addresses restrictions.

More apache features

Apache Installation

Compiling and Installing Apache

Apache is available in source code and binary form from apache’s website. Most of the time people use binary form for installation. We use binary form for apache installation.
Download apache from http://httpd.apache.org/download.cgi  for windows apache_2.0.55-win32-x86-no_ssl.msi download this file. Or for linux download tar or RPM file. Apache installation on Linux needs a little different configuration.

First select file

Apache binary file

Double click on executable file  

apache  installation start

apache agreement

 

Accept license agreement of apache.

apache installation

Put network Domain as your website or domain name. e.g localhost and email ID of administrator.

 

apache mode typical

 

Click on next select typical mode.

apache installation path define

 

Define apache installation path where should apache install.

 

apache installation begin

 

wait for installation to complete

 

apache installation finished

Now apache is installed sucessfully.

 

Configuration of apache

Configuring apache is done through httpd.conf file.
 “C:\Program Files\Apache Group\Apache2\conf”. Httpd.conf is main file where we can configure apache and customize our setting. We can make virtual Hosting, change apache’s default port number, Naming server, load balancing, connecting with server with the help of connector and modules.

This file looks like this

 

#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "E:/apache/Apache2" will be interpreted by the
# server as "E:/apache/Apache2/logs/foo.log".
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default. It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
#

Set default User connections, binding Addesses, install modules load module,

Add modules for php
e.g

LoadModule php5_module "C:\php\php5apache2.dll"
AddType application/x-httpd-php .php

Can change it to any other port

ServerName abc:80

Can change default document root directory by changing this path

<Directory "C:\Program Files\Apache Group\Apache2\htdocs">

 

Set customized error file in apache

#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html

Uncommented this one and add error file.

Virtual Hosts in apache
Setting for virtual hosting


#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

Uncommented this block and Put name according to your requirements. Finally save this httpd.conf file and restart apache.

Apache Services start and stop

Apache can be restarted, Windows it is easy way, go to tools

this tool is placed in startup menu bar right of bottom. apache stoping starting Apache

apache icon in windows to start service

Right click on this tool. A popup come

apache configuration

 

Go open Apache monitor option.

apache start stop

 

Now select Apache2 and Restart it. We can stop and start services from this tool.

Deployment & Test apache

Finally time to deploy any application or html file in apache. We need to copy any html file in
C:\Program Files\Apache Group\Apache2\htdocs directory.

Now open this file in web browser by entering this path
http://localhost/

 

 
     
  follow EasyWayServer  
     
     
  HTML TagsNew  
     
 
JSP Tutorials New
Learn JSP in very less time with example and output. No more headache to scan books about JSP
 
     
 
JDBC Tutorials New
Learn JDBC in very less time with example.
 
     
 
Tomcat Clustering
Clustering is technique to improve the performance, high scalability, and failover of web-server or any servers. Number of users increase with increase load on the servers
 
     
 
Implementation of tomcat clustering
Simple steps to do tomcat clustering with code
 
     
 
Tomcat Installation & Configuration
Tomcat installation on windows, environment system variables setting in Visual mode for easy installation and configuration of web.xml other servlet invoker setting
 
     
 
Apache Tomcat integration with mod_jk
Integrate Apache web server with tomcat web server with mod_jk
 
     
 
Java Servlet Examples
Learn first servlet by example
 
     
 
Apache installation
Apache installation on windows and linux
 
     
 
Mysql Installation
Mysql installation on windows, Port setting,installing mysql tools query browser, connecting to database,creating database, creating tables
 
     
 
Apache PHP MySql integration
 
 
     
 

Keep up-to-date with all the latest articles, tutorials, reviews by subscribing to our newsletter.

Enter your email address:

 
     
   
 
Link to Us
 
 
If You Like this Article, share this

 
 
     
     
 
  Privacy Policy