2. A web server is specialised software that
responds to client (I.e. web browser) requests
Every web site requires a web server to process
client requests and serve up the pages
Web servers used to service Internet, intranets
and extranets
3. A web server is part of a multi-tier application (also called
n-tier application Functionality is divided into separate
tiers or groupings
Tiers can be on same computer or on separate computers
Web applications are often three tiered:
Information tier (also called data tier)
Middle tier
Client tier (user interface tier)
4. Hyper Text Transfer Protocol
Web servers communicate with clients using a Response-Request protocol: HTTP
5. A request is generated by a client (by browser
software)
- Most common requests are Get and Post
Request reaches the appropriate web-server
Request is processed by the web-server
A response is formulated by the web server
and sent back to the client (e.g. web page
contents)
6. Client-Server model and HTTP
HTTP is the de facto standard for transferring
World Wide Web documents
Usually to port 80
HTTP messages (requests and responses)
between client and server are human
readable
7. Http: Requests from client
Request
Get resource
Type of browser
Name of host
etc
First line is request-line. Contains the nature of the
Request e.g.
GET: Get a file from the server
POST: Post data to the server
PUT: Store some resource
8. HTTP Response Status Codes
1XX: Provide information to the client
2XX: Correct response has occurred.
3XX: Browser must carry out some further action in order for the
request to be successful. For example, the code 301 indicates that
the resource that was requested has been permanently moved to
another location.
4XX: Something has gone wrong; for example, the most frequent
status code that is returned is 404 which indicates that the
resource that has been requested cannot be found.
5XX: Server has experienced a problem. For example, the status
code 503 indicates that the service requested has not been able to
be carried out.
10. web server functionality
But usually includes many other functions such as:
File Transfer Protocol (FTP) server
Simple Mail Transfer Protocol (SMTP) server (for
Email)
Web development and publishing functionality
Support for specific server side technologies
e.g. JSP, SSIs
Security features
And more
11. Selecting a web server
Performance
e.g. how many client requests per second can
be processed? Load balancing?
Reliability
How robust is the web server?
How liable to crash? How easily recovered?
12. Ease of Use
How easy to set up, administer, learn?
Support
What support is provided by the vendor?
Price
How must does it cost to buy and maintain?
Security
What security functionality is offered? e.g. SSL?
Functionality
server side techologies supported? (as add-ons? e.g. TomCat for Apache) e.g.
ASP? JSP? CGI? etc
Logging
Proxy server
Operating system
What operating system(s) does the web server support?
24. WEB SERVERS(IIS, APACHE,
NGINX)
1) Client sends request to server.
2) Server accepts the request and then
process it.
3) Server sends back the request to client.
26. TYPES OF WEB SERVERS
Dedicated Server:
- physical server
- purchased or rented for your own business
needs
- For large businesses
- high levels of data security
- running 24*7*365
27. Cloud Server:
- virtual server
- less costs
- for small and mid-sized businesses
28. HANDLE REQUESTS
1. append the given path to the path of root directory
Root directory in configs
Https://arastu.ir/a/b/c.pdf
/home/arastu/www/arastu.ir/a/b/c.pdf
2. Create Response
Based on configs
Create response dynamically with server side
programming languages
Return static file
Error