Web Server Administration - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Web Server Administration

Description:

... of all Web servers use Apache. How a Web Server Works ... apps could track information based on client IP address, but ... Apache can also be used as a ... – PowerPoint PPT presentation

Number of Views:515
Avg rating:3.0/5.0
Slides: 31
Provided by: ssi45
Category:

less

Transcript and Presenter's Notes

Title: Web Server Administration


1
Web Server Administration
  • Chapter 6
  • Configuring a Web Server

2
Overview
  • Understand how a Web server works
  • Understand HTTP
  • Install and configure IIS Web server
  • Host multiple Web sites
  • Understand virtual directories

3
How a Web Server Works
  • HTTP (Hypertext Transfer Protocol) defines how
    information is passed between a browser and a Web
    server
  • The two most popular Web servers are
  • Apache from Apache Software Foundation
  • Internet Information Services (IIS) from
    Microsoft
  • Almost two-thirds of all Web servers use Apache

4
How a Web Server Works
  • As is true with other servers such as DNS, Web
    servers listen for communication at a port
  • The default port is 80
  • You can also create Web servers at port numbers
    greater than 1023
  • Each Web server has a document root, which is
    where you store the HTML documents

5
Understanding HTTP
  • The current version of HTTP is 1.1
  • Virtually no browsers are so old that they do not
    support 1.1
  • HTTP is a stateless protocol, meaning that each
    Web page sent is independent of every other Web
    page sent
  • This makes it more challenging to create a
    shopping cart application

6
HTTP and Cookies
  • HTTP Stateless protocol (no connection between
    different requests)
  • Web server apps could track information based on
    client IP address, but DHCP makes this
    meaningless
  • Cookies Files created on client by Web server
    application that records information from
    previous visits or requests. File name indicates
    server (domain or URL)

7
HTTP/1.0 Retrieving Web Pages
  • Establish TCP connection with server (3-step
    handshake SYN SYN/ACK - ACK)
  • Client requests a page
  • Server sends requested file data
  • Server closes connection with client, indicating
    no more data to be transferred
  • Client interprets HTML for any embedded file
    reference (graphics, images, sound), repeat this
    process

8
HTTP/1.1 Retrieving Web Pages
  • Client identifies support for HTTP/1.1 to server
    when requesting a file
  • Persistent Connection is default no need to
    re-establish connection for each embedded file
  • Substantial performance improvement since most
    web pages have numerous imbedded files

9
HTTP/1.1 and IIS Performance Features
  • Persistent connections Maintain TCP connection
    to send/receive multiple files
  • Pipelining Client can send multiple requests in
    parallel rather than handling each request
    sequentially
  • Chunked transfers Length of data included in
    transmission so data can be broken into multiple
    pieces of different sizes (benefits ASP)
  • Proxy support Caching information provided such
    as expiration dates
  • Host headers One IP addr, multiple servers

10
HTTP Request/Response
  • URL format host . domain port / path
  • Web server port default 80 (443 for SSL
    encrypted data)
  • Header indicates type of request (method), URL,
    client HTTP version supported
  • Server returns HTTP version, status code, reason
    phrase

11
HTTP Transaction 3 parts
  • Request (method) or Response
  • Header Section
  • Entity Body
  • Not relevant to GET method
  • Contains data for PUT, POST or server response

12
Understanding HTTP
  • When the browser sends a request to a Web server,
    it looks like
  • GET /hello.htm HTTP/1.1
  • Host www.technowidgets.com
  • The above requests the hello.htm file from the
    document root of the Web server
  • It specifies the host of www.technowidgets.com
  • There could be multiple hosts at the IP address

13
HTTP Request Methods
  • Get Retrieve specific URL and imbedded files
  • Conditional send data based on modification date
  • Partial Retrieve part of the file data
  • Head Reply with response headers but no data
    (check validity of a hyperlink or cached data)
  • Post Send data to a URL (CGI, ISAPI, ASP)

14
HTTP Headers
  • Client Request
  • Accept preferred mime types
  • Cookie if any from prior visit(s)
  • If-Modified-Since conditional
  • Referer who provided this address
  • User-Agent Browser level

15
HTTP Headers
  • Server Response
  • Server which software is running
  • Set-Cookie leave info for next visit
  • Entity Headers
  • Content-Length size of data (bytes)
  • Content-Type MIME type
  • Expires Data will be renewed on expiry
  • Last-Modified How old is the data

16
Understanding HTTP
  • The following shows some of the headers along
    with the HTML that the Web server would send
  • HTTP/1.1 200 OK
  • Server Microsoft-IIS/5.0
  • Content-Type text/html
  • Last-Modified Fri, 17 May 2005 182125 GMT
  • Content-Length 43
  • lthtmlgtltbodygt
  • Hello, World
  • lt/bodygtlt/htmlgt
  • The headers contain information about the page

17
Status Codes to remember
  • 100 Continue
  • 200 OK
  • 300 series Redirection
  • 301 Moved Permanently
  • 302 Found (Moved temporarily)
  • 304 Not modified (in response to conditional GET
    (If-Modified-Since header)

18
Status Codes to remember
  • 400 series Client Error
  • 400 Bad request
  • 401 Unauthorized login failed
  • 403 Execute access forbidden
  • 404 File not found
  • 500 series Server Error
  • 500 Internal server error
  • 501 Function not supported
  • 502 Bad gateway (invalid response from upstream
    server)

19
Features in Apache
  • Apache 1.3 was used for many years but version
    2.0 was released in 2001
  • Apache can also be used as a proxy server
  • A proxy server isolates your real Web server from
    the Internet
  • Apache 2.0 has
  • Better support for Windows
  • Support for IPv6
  • Simplified configuration
  • Unicode support in Windows
  • Multilanguage error responses
  • Apache supports many programming languages such
    as Perl and PHP

20
Features in IIS
  • IIS versions associated with Windows versions
  • Windows NT IIS 4.0
  • Windows 2000 IIS 5.0
  • Windows Server 2003 IIS 6.0
  • SMTP can be easily added so you can send e-mail
    from your Web pages

21
Features in IIS 5.0
  • Web Distributed Authoring and Versioning (WebDAV)
  • Allows a server to share Web-based files
  • Named virtual hosting
  • Multiple Web sites can share a single IP address
  • Per Web site bandwidth throttling
  • Control bandwidth by Web site
  • Kerberos authentication
  • Secure Sockets Layer 3.0
  • Encrypted communication

22
Features in IIS 6.0
  • Increased security
  • Default permits only HTML documents
  • Expanded language support
  • Can use XML and SOAP
  • Support for IPv6
  • Increased dependability
  • Kernel-mode HTTP service
  • Self-healing mechanism

23
Components in IIS
  • File Transfer Protocol (FTP) server
  • To transfer files between user and server
  • FrontPage 2000 Server Extensions
  • Used by programs to transfer files to and from a
    Web site
  • NNTP Service
  • Used to create user forums
  • SMTP Service
  • World Wide Web Server

24
Default Web Site Properties in IIS
25
Tabs on the Default Web Site Properties Dialog Box
  • Operators (Windows 2000) only
  • This property lists users who can administer Web
    site
  • Performance
  • Limit bandwidth by Web site
  • Limit simultaneous connections (Windows 2003)
  • ISAPI Filters
  • Specify applications that process HTTP requests

26
Tabs on the Default Web Site Properties Dialog Box
  • Home Directory
  • Specifies the location and properties of the
    document root
  • Log information here
  • Permissions
  • Documents
  • Configure the name for default Web pages
  • HTTP Headers
  • Add your own custom headers
  • Custom Errors
  • Create custom pages for HTTP errors

27
Hosting Multiple Web Sitesby Port Number
  • Associate each new Web site with a port above
    1023
  • To retrieve a Web page from a site at port 8080
  • www.technowidgets.com8080/prod.htm
  • Because it requires a user to add the port
    number, it is not a popular method

28
Hosting Multiple Web Sitesby IP Address
  • You can create multiple IP addresses on a single
    NIC
  • Referred to as virtual IP addresses
  • Useful for flexibility because if each domain has
    its own unique IP address, you can easily move
    the domain to a different Web server
  • It is getting more expensive to get multiple IP
    addresses from an ISP

29
Hosting Multiple Web Sitesby Host Name
  • Multiple host names can be associated with a
    single IP address
  • Getting a single IP address from your ISP is
    relatively inexpensive
  • You can host an almost unlimited number of
    domains with a single IP address
  • It is the most common method of hosting

30
Web Server Administration
  • Chapter 6
  • Configuring a Web Server
Write a Comment
User Comments (0)
About PowerShow.com