Thursday, December 6, 2012

Apache Web Server


 We were disscussed about Desktop Secuirty. before we going start attacking or security related discussion topic.Lets Discuss about protocol working in backtrack which are helpful for attack and finding loopholes in websites or system. What is apache server? and what is use main use of Apache server? and How to install this sever? we will see now ......

The Apache HTTP Server, is a web server  software 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), and since has evolved to dominate other web servers in terms of functionality and performance.Typically Apache is run on a Unix like operating system, and was developed for use on Linux.


INTRODUCTION TO APACHE
Apache is a http web server maintained by a opensource community called Apache Software Foundations. It runs on port 80 which is the default port number of HTTP (Hyper Text Transfer Protocol).
INSTALING APACHE
It can be installed using apt-get process or from package manager
sudo apt-get install apache2
STARTING APACHE
It can be started either from terminal or from GUI
Starting from Terminal:-
Step 1: Open terminal
Step 2: Enter the following command
apache2ctl start
Starting from GUI ;-
click applications/backtrack/services/HTTPD/apache start
This location may vary from one operating system to another.
Any one of this procedure starts the apache server
TESTING APACHE
This can be testad by using netstat command
netstat -ant |grep 80
If it shows some output  like  this this means apache server is running on your system
INTRODUCTION TO APACHE
Apache is a http web server maintained by a opensource community called Apache Software Foundations. It runs on port 80 which is the default port number of HTTP (Hyper Text Transfer Protocol).
INSTALING APACHE
It can be installed using apt-get process or from package manager
sudo apt-get install apache2
STARTING APACHE
It can be started either from terminal or from GUI
Starting from Terminal:-
Step 1: Open terminal
Step 2: Enter the following command
apache2ctl start
Starting from GUI ;-
click applications/backtrack/services/HTTPD/apache start
This location may vary from one operating system to another.
Any one of this procedure starts the apache server
TESTING APACHE
This can be testad by using netstat command
netstat -ant |grep 80
If it shows some output  like  this this means apache server is running on your system

It means an application(HTTP) server using tcp protocol whose port number is 80 is running on your local host  and is in listenning state.

USING APACHE
Once the server is started every one in local network can access it using browser.
Steps to access server from local browser
Step 1: Every client should know server ip address. It can be found by typing ifconfig on server machine. I am skipping details of ipconfig and interfaces in this article.
ifconfig
Step 2: Enter the address of server on browser
For Example: If local server is on ip address "192.168.1.100" then type "http://192.168.1.100" it shows the default web page

SETTING UP WEB PAGES
Default web page for apache is "index .html" at location /var/www. If u go to the location /var/www an index.html file will be present at this location. This is the folder where u need to place your web content.
Designing HTML is not explained in this article. Once you have your html page it has to be renamed as index.html and pass it in same location "/var/www".
APACHE USAGE COMMANDS
Apache help can be obtained by
apache2ctl -h
It displays all the commands and their usage.
Apache software version can be obtained by
apache2 -v
RESTARTING APACHE
Apache can be restarted by typing the command
apache2ctl restart
CLOSING APACHE
To close apache type the command "apache2ctl stop" on terminal
apache2ctl stop
Try to test it again with netcat as explained above in TESTING APACHE it should show nothing
CONCLUSION
Every thing explained above is with respect to Backtrack 5. It should also work with ubuntu only the GUI, locations may vary .
Version showed in this article is Apache/2.2.14 (Ubuntu).
All the information is use for knowledge purpose. don't miss use it.If any kind of misuse happen then your the only person who is responsible.