You are on page 1of 15

Web Applications Development

ITSE3302

Dr. Moamar G. Elyazgi

1
Contents

 Module 1: Introduction to Web Applications


 Module 2: Server Installation
 Module 3: Web Page Design
 Module 4: Dynamic Content
 Module 5: Database Access

2
Module 2
Server Installation

 Basic Web Server Concepts


 Apache Server
 Other Free Software Web Server
 Practical: Installing a Web Server

3
Basic Web Server Concepts

 Staticfile service
 Security and authentication
 Dynamic Conten

4
Basic Web Server Concepts

 A web server is a program that deals with


and responds to the diverse requests
performed by browsers, providing the
requested resources through HTTP or
HTTPS protocol (the secure, encrypted and
authenticated version of HTTP).

5
Basic Web Server Concepts
 A basic web server has a very straightforward schema
of operation that executes the following loop infinitely:
1) It waits for requests on the assigned TCP port (The
recommendation port for HTTP is 80)

2) It receives a request.

3) It looks for the resource in the request string.

4) It sends the resource by the same connection through which it


received the request.

5) It returns to step 2.
6
Static File Service
 All web servers must at least be able to serve the
static files located on a specific part of the disc.
 One essential requirement is to be able to specify
which part of the disc will be served.
 Most web servers also allow us to add other directories
to be served, specifying the point of the virtual "file
system" on the server where they will be located.
 Some web servers also allow us to specify security
directives (for instance, the addresses, users, etc. for
which a directory will be visible). Others allow us to
specify which files will be considered the directory
7 index.
Static File Service

 For example, we can have the following situation:

Disc directory Web directory

/home/apache/html /
/home/company/docs /docs
/home/joseph/report /report-2003

8
Static File Service

 In this case, the server should translate the following web


addresses as:

URL Disc file

/index.html /home/apache/html/index.html
/docs/manuals/product.pdf /home/company/docs/manuals/product.pdf/
/company/who.html /home/apache/html/company/who.html
/report-2003/index.html /home/joseph/report/index.html

9
Security and Authentication

 Most modern web servers allow us to control security and


user authentication from the server program.
 The simplest method of control is with the use of .htaccess
files.
 In this file, we indicate which users, machines, etc. have
access to the files and subdirectories of the directory in which
the file is located.
 Others allow us to specify service rules for directories and
files in the web server configuration, specifying in the latter
the users, machines, etc. that can access the indicated
resource.
10
Security and Authentication

 As for authentication (validation of the username and


password provided by the client), web servers offer a
wide variety of features.
 Most allow us to provide the web server with a file
containing the usernames and passwords to validate
those sent by the client.
 In all events, it is common for servers to provide gateways
allowing us to delegate the tasks of authentication and
validation to different software (such as RADIUS, LDAP
etc)
11
Dynamic Content
 Web content is generated dynamically rather than coming
from static pages.
 The web server's support for dynamic content is one of the
most critical factors to take into account when making your
choice.
 Many offer support for certain programming languages
(basically interpreted), such as PHP, JSP, ASP, Pike, etc.
 We strongly recommend that the web server you use
provides support for one of these languages (the most
widespread being PHP), without taking into account JSP,
which usually requires external web server software to work
12 (such as a servlet container).
Module 2
Server Installation

 Basic Web Server Concepts


 Apache Server
 Other Free Software Web Server (In LAB)
 Practical: Installing a Web Server (In LAB)

13
Apache Server

 The birth of Apache


 Installing Apache
 Compiling from source
 Installation with binary packages
 Configuring Apache

14
The birth of Apache
 Apache is a robust, free software web server implemented
through a collaborative effort that offers equivalent features
and functionality to commercial servers.
 In February 1995, the most popular Internet web server was
a public domain server developed at NCSA (National Center
for Supercomputing Applications of the University of Illinois).
 On 1 December 1995, Apache 1.0 appeared, which
included documentation and a number of improvements in
the form of embedded modules. Shortly afterwards, Apache
surpassed the NCSA server as the most widely used on the
Internet, a position that it has maintained to this day.
15

You might also like