Pick a Free OS

User login


Web server tutorial - Part 1

The network card gives a signal back to operating system that a data enclosed with http header using TCP/IP header has arrived. One's operating system checks that data has http wrapper and searches for Web server on that machine. When it finds, it hands over the data and pays attention to other processes.

Before the Web server processes the data, it goes through a filtration by the gateway process implemented on the Web server, which actually filters the raw data. This concept implemented is called as common gateway interface that has the Web server environment variables, which stores the data in different variable. When the user asks for some unnecessary data, headers also get attached with data and so the need for filtration.

Apache as Web server


The Web server is meant for keeping Websites. There are three ways a Website can be stored. They are:

1) default directory hosting

2) virtual directory hosting

3) virtual domain hosting

We have to first configure the DNS. Then configure the following file (redhat 6.2) /etc/httpd/conf/httpd.conf

If we use Apache as a Web server whether on Windows platform or Linux, the main file which is used is called /etc/httpd/conf/httpd.conf

The root directory of Web server is /etc/httpd, which is divided into three parts:

1) /etc/httpd/conf (where configuration files stays)

2) /etc/httpd/logs (where the logs of Web server and site accessing stay)

3) /etc/httpd/modules (where the module stays, which enables the server side programmer to do programming in the languages supported by Web server)

Lets open the file /etc/httpd/conf/httpd.conf and take a detailed look at the macros to be used.

httpd.conf-Apache HTTP server configuration file

(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.

Note: See http://www.Apache.org/docs for detailed information about the directives. Do not simply read the instructions in here without understanding what they do. They're here as hints or reminders. If you are unsure consult the online docs.

After this (httpd.conf) file is processed, the server will look for and process (only in the case of 6.1 the following mentioned file is checked. If it is 6.2 they are not checked):