Web Tech Class 4
Web Tech Class 4
Web Tech Class 4
CS 625/CO 423
Nginx
Lighttpd
Oracle iPlanetWeb Server
XAMPP
LiteSpeedWeb Server
Monkey HTTP Server
Google Web Server
4
Apache Web HTTP Web Server
Initially started in 1996 by Robert McCool.
Since April 1996, Apache web server has been the most
popular HTTP server in the market on the World Wide Web.
The Apache was the first web server architecture that was
used by the Netscape Communication Corporation.
Apache has evolved with the years of the internet. Server is
used to support both static and dynamic pages online. Many
programming languages are supported by the Apache Server
are as follows: PHP, Perl, Python and alongside with MySql.
As of April 2008, the Apache Server serves approximately
50% of the current web pages.
5
Overview of the Apache HTTP Web Server
Apache is a open source HTTP web server. It handles HTTP
requests sent to it and responds to them.
Apache is built and maintained over at Apache.org
Apache is comprised of Two main building Blocks with the
Latter being comprised of many other little building blocks.
The Building Blocks are the Apache Core and then the Apache
Modules that in a sense extend the Apache core.
Very easy to implement and very easy to add extend its abilities
by the adding of different modules. This is why this server has
become so popular.
Apache Overview Diagram
Apache’s modular
approach to add to the
basic functionality of
the server without
disturbing the basic
Core implementation.
Apache HTTP Web Server Architecture
Web Server Types
Based on the way the Web Server handles request from theWeb
client, ApacheWeb Servers can be categorized into following
types.
Single-Threaded Web Servers
Multi-ProcessedWeb Servers
Multi-ThreadedWeb Servers
Single-Threaded Web Servers
Accept HTTP Parse HTTP Retrieve and read Respond by sending
connection request connection request the resource file back the data
Process N
Accept HTTP Parse HTTP Retrieve and read Respond by sending
connection request connection request the resource file back the data
<LocationMatch Regex>
Directives
</LocationMatch>
<FilesMatch Regex>
Directives
</Files>
Modules
Apache functionalities are implemented as Modules.
httpd –l gives the list of modules already included in the
executable code of Apache
ClearModuleList Clears the list of active modules
AddModule activates a module that is compiled but
not active
AddModule mod_module.c
Dynamic Shared Objects
DSO provide the capability of specifying which portions of
an executable are to be included/excluded at runtime
LoadModule perl_module libexec/libperl.so
Handlers
Modules provide specific handlers to handle specific types of
requests/files
To invoke a particular handler
SetHandler handler_name
ServerType standalone|inetd
httpd will start as standalone background process or will be started by
inetd as and whenrequired
Port 80 default ports in /etc/services
Port 443 for SSL
User Apache
Group 506
ServerAdmin root@yoursite.org
Email address where the users will send mails incase of any problem
BindAddress * | IP-Address
Server attends a specific IP-Address or * means all IP_Addresses if the local machine has
multiple NICs
Directives
ServerName www.example.com
Specifies the alternative host name that will be returned to the client in
place of actual host name
Normally www. may be prefixed with the actual host name
Must be known to the DNS
DocumentRoot /var/www/html
Website resides here
UserDir public_html
User level individual website resides here
DirectoryIndex index.html index.htm default.htm welcome.htm
Default home page
AccessFileName .htaccess
Alias /icon/ /usr/local/etc/httpd/icons/
Directives for CGI
<Directory /var/www/cgi-bin>
AllowOverride none
Options+EcecCGI
Order allow, deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
References
1.https://opensource.com/business/16/8/top-5-open-source-web-servers