CSE 190: Internet Commerce Lecture 4: Web Servers.

Slides:



Advertisements
Similar presentations
Hypertext Transfer PROTOCOL ----HTTP Sen Wang CSE5232 Network Programming.
Advertisements

World Wide Web Basics Original version by Carolyn Watters (Dalhousie U. Computer Science)
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Skills: none Concepts: protocol, hypertext transfer protocol, standard This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike.
CSE 190: Internet E-Commerce Lecture 5. Exam: 3-Tier Architecture What are the three tiers? –Presentation, application, and data tier Presentation: responsible.
Chapter 9 Application Layer, HTTP Professor Rick Han University of Colorado at Boulder
1 HTTP – HyperText Transfer Protocol Part 1. 2 Common Protocols In order for two remote machines to “ understand ” each other they should –‘‘ speak the.
How the web works: HTTP and CGI explained
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Know how HTTP accesses data on the WWW Objectives.
1 Web Search Interfaces. 2 Web Search Interface Web search engines of course need a web-based interface. Search page must accept a query string and submit.
CSE 190: Internet E-Commerce Lecture 8. Application Tier Architecture Model View Controller pattern Model 2 architecture Statelessness of application.
Configuring a Web Server. Overview  Understand how a Web server works  Install IIS (Internet Information Services) and Apache Web servers  Examine.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
CP476 Internet Computing Browser and Web Server 1 Web Browsers A client software program that allows you to access and view Web pages on the Internet –Examples.
Outcomes Know what are CGI Environment Variables Know how to use environment variables How to process A simple Query Form Able to use URL Encoding rules.
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
1 Web Servers Web Protocols and Practice Chapter 4.
Linux Operations and Administration
2440: 141 Web Site Administration Web Server Configuration Instructor: Enoch E. Damson.
Basics of the HTTP Protocol and Apache Web Server Brandon Checketts.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
1 Introduction to PHP. 2 What is this “PHP” thing? Official description: “PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used Open Source.
Web technologies and programming cse hypermedia and multimedia technology Fanis Tsandilas April 3, 2007.
COMP3016 Web Technologies Introduction and Discussion What is the Web?
Basic Network Services IMT 546 – Lab 4 December 4, 2004 Agueda Sánchez Shannon Layden Peyman Tajbakhsh.
FTP (File Transfer Protocol) & Telnet
Apache httpd Web Server C. Edward Chow. Advanced Internet & Web Systems chow2 Outline of the Talk Introduction to Apache httpd web server Basic Compilation,
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
HTTP HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based communication protocol which is used to deliver virtually all files and other.
Web Services CSCI N321 – System and Network Administration Copyright © 2007,2008 by Scott Orr and the Trustees of Indiana University.
WebServer A Web server is a program that, using the client/server model and the World Wide Web's Hypertext Transfer Protocol (HTTP), serves the files that.
CSE 190: Internet E-Commerce Lecture 5. Exam Material Lectures 1-4 (Presentation Tier) –3-tier architecture –HTML –Style sheets –Javascript –DOM –HTTP.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 10: Web 10/6/20151Distributed Systems - COMP 655.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
1 Apache and Virtual Sites and SSL Dorcas Muthoni.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
Apache Web Server. Aim of this section –Introduce you to workings of the most common webserver –Give you a little experience in role of webmaster Configuring.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
LinuxChix Apache. Serving Webpages The layer 7 protocol (HTTP) is what our browsers talk to get us the websites we can't seem to live without. HTTP is.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
WEB SERVER Mark Kimmet Shana Blair. The Project Web Server Application  Receives request for web pages or images from a client browser via the internet.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
HTTP How the Internet servers and clients communicate.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
More than one site? Use multiple configuration files Use multiple configuration files  httpd –d {path}  Assumes “conf/httpd.conf” Logging transactions.
Web Server Administration Chapter 6 Configuring a Web Server.
Overview of Servlets and JSP
IBM Http Server Basic Administration. CONTENTS Web server IHS How does IHS differ from Apache Basic configurations Advanced Configurations Performance.
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Free Powerpoint Templates Page 1 Free Powerpoint Templates CHAPTER 1 LAB 1.1 Web Server.
Fiddler and Your Website Robert Boedigheimer. About Me Web developer since 1995 Columnist for aspalliance.com Pluralsight Author 3 rd Degree Black Belt,
Web Server Administration Chapter 6 Configuring a Web Server.
APACHE Apache is generally recognized as the world's most popular Web server (HTTP server). Originally designed for Unix servers, the Apache Web server.
Web and Proxy Server.
Web Protocols and Practice
HTTP – An overview.
HTTP Hypertext Transfer Protocol
APACHE WEB SERVER.
CSCI-351 Data communication and Networks
Presentation transcript:

CSE 190: Internet Commerce Lecture 4: Web Servers

Web Servers What do they do? How do they work? Apache: Installation, Configuration Apache: Administration Special Topics

What does a web server do? A web server serves files to clients (such as the browser) Files may be HTML, GIFs, video, PDF Serves multiple clients at the same time Transfer protocol: HTTP

Commercial Implementations Apache IIS Netscape Commerce Server Netcraft data for active servers (

HTTP Simple text command-response protocol Always uses TCP/IP (connection oriented) Methods: GET, POST, HEAD Stateless protocol: no client identifier Uses 8 bit bytes (octets) HTTP Versions: 0.9 (assumes HTML), 1.0 (client/server headers), 1.1 (persistent connections) HTTP status codes –200s (Success) –300s (Redirect) –400s (Bad request) –500s (Server Failure)

HTTP Illustrated GET / HTTP/1.0 –Standard HTTP/1.0 request for main site page GET /ex1.html HTTP/1.0 –Standard request for the ex1.html page GET /ex1.gif HTTP/1.0 –Request an image file (image/gif) GET /notthere.html HTTP/1.0 –Returns 404 (Not found) response GET / –An HTTP/0.9 request GET / HTTP/1.1 Hostname: gremlin.ucsd.edu GET /ex1.html HTTP/1.1 Hostname: gremlin.ucsd.edu –A pipelined request

HTTP Illustrated (POST, HEAD) HEAD / HTTP/1.0 –Just view what headers are returned by GET POST /cgi-bin/ex2.pl HTTP/1.0 Content-Length: 25 user=guest&pass=secret –Posts two parameters to a script

HTTP Illustrated (Realistic request) GET /x.html HTTP/1.1 Connection: Keep-Alive Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Encoding: gzip, deflate Accept-Language: en-us Host: gremlin.ucsd.edu:60846 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Cookie: bookcookie=

How does a web server work? Serial request model (Example: printhttp.pl) while (true) accept client connection read HTTP request parse request pathname = req.uri_details send HTTP response header foreach byte in file pathname send byte to client close client connection Pitfall: Requests from other clients have to wait

How does a web server work? Multiple clients (Apache model) Parent: Listen on Port (server default: 80) Fork StartServers number of child processes Wait forever and periodically, If #children < MinSpareServers, fork a new child If #children < MaxSpareServers, kill any child not handling request Child: while (true) Accept client connection Parse request, send response Increment request_count If request_count > MaxRequestPerChild then exit

Apache model Provides multiple processes to handle simultaneous requests Throttles the number of child processes Crashing a child process doesn’t crash the server; the parent is very stable Memory leaks don’t take down the machine; memory freed when child exits Note: IIS uses similar model, but with threads instead of processes Extending Apache through modules –Core, mime, auth, cookies, redirect

Apache: Installation Download from apache.org – gunzip –c apache-…tar.gz | tar xvf -./configure --prefix =$HOME/apache make make install ~/apache/bin/apachectl start Test by telnet localhost 8080

Apache: Configuration (Starting) Port (Usually 80 when deployed; must be unique for the machine) DocumentRoot (Directory for files) ServerName (Domain name for server) User (for root only: specify Unix user id) To validate: apachectl configtest

Apache: Administration Starting –apachectl start; verify with ps -ef Stopping –apachectl stop: kills `cat logs/httpd.pid` Viewing logs –access_log: host ident authuser date request status bytes –error_log: date priority host error Log rotation (rotatelogs); excessive logging

Special Topics SSL –What it is, how it works (handshake, key gen, authen, client auth) –Traffic flows over the https port 443 –Added with mod_ssl –Getting a server certificate (Verisign: $350-$1000) –Overhead to SSL requests

Special Topics Virtual Domain Hosting –Serve multiple web sites from the same machine –Name based or IP based Syntax: NameVirtualHost * ServerAdmin DocumentRoot "/home/sinala/apache/htdocs" ServerName gremlin.ucsd.edu ErrorLog logs/error_log CustomLog logs/access_log common ServerAdmin DocumentRoot "/home/sinala/apache/htdocs/mysite" Port 8080 ServerName mysite.com ErrorLog logs/mysite-error_log CustomLog logs/mysite-access_log common

Special Topics CGI (Common Gateway Interface) –Initial way to add interactivity –Uses mod_cgi –Slow: new process created per request –Perl Example: /cgi-bin/rumple

HTTP authentication MIME types Proxies Expected performance Multilanguage