© De Montfort University, Web Servers Chris Hand And Howell Istance De Montfort University
© De Montfort University, Web Serving Web servers Configuration File Structure / Mapping / Practicalities Logging, Administration etc.
© De Montfort University, Web Servers Web server functionality: –process requests (GET / POST …) –deliver content (HTML files, whatever…) –log activity (where/ when/ what/ …) –authentication(secures parts of the site) –Run databases, secure encryption, caching software, logs analysis …
© De Montfort University, Server OS There are two main battlegrounds –Windows NT4/5 with Microsoft’s IIS (Internet Information Server –Unix machines with Apache –Unix or NT with IBM or Netscape servers 3 main deciding factors –Staff capability –Policy (tied to IBM/Microsoft/Netscape) –Cost
© De Montfort University, System Choice – Pay Microsoft –Excellent Office support built in –Excellent DB integration –ASP – easy to use/ maintain –Proprietary Netscape / IBM / iPlanet –Alternatives to MS –Similar features –Using more open standards
© De Montfort University, System Choice – Free Apache Low cost Rapid open development Well supported Cross platform Secure Flexible
© De Montfort University, System Choice – Hardware 1 Memory – most important CPU – fast often helps –Fast when doing speciality serving i.e. RealVideo … –Fast for very large databases –Fast for a large number of users –Minimum: Pentium II 266 Mhz –Needed: Dual; Processor Pentium III Multi-servers to share the load/ reliability
© De Montfort University, System Choice – Hardware 2 Bandwidth –Ideally, as much as possible –Don’t share with other tasks Connection –Uptime is very important –Hosted service - we only create content –Self-hosted - need network admins too
© De Montfort University, Servers: Apache Open Source, multi-platform Evolution of the NCSA server (1994/5) 1 year later = #1 server in the world Still leader (Sept ‘01: 58% of market) Very stable Masses of features Extensible Not easy to configure, but powerful
© De Montfort University, Servers: IIS Big player – produced by Microsoft IIS 5.0 part of Windows 2000 Advanced Server, not the standard server Windows Media Server is an installable component part of IIS5.0 Supports.cgi but also Internet Server Application Programming Interface – applications written with this API, as.dll and loaded into the address space of the HTTP server Supports.asp (Active Server Pages)
© De Montfort University, Servers: Jigsaw The W3C reference server Written in Java Experimental Flexible for testing Runs on anything Good support for servlets and JSP
© De Montfort University, Server Configuration Common configuration info –Port to run on (listen on) –Root directory location in local filesystem –Administrator contact / error handling –file to MIME-type associations –URL Redirection –Directory browsing configurations –Authentication / passwords –/robots.txt –Logging –Virtual hosting
© De Montfort University, Configuration Port to run on (listen on) –Usually port 80, in theory can be anything > 1024 –Lets us run multiple servers on different ports Server Administrator contact –An address –A feedback form –Replacement page for errors like 404 –An automatic tool to inform the admin
© De Montfort University, Configuration: Redirection Browser requests URL, server sends it somewhere else –on same server –on another server Useful when content has moved –send browser to new location automatically
© De Montfort University, MIME Multi-purpose Internet Mail Extensions File extensions are not reliable as a means of identifying type of content, different operating systems use different conventions General form: Content-type: type/subtype –text/html –text/plain –image/gif –application/postscript –video/x-ms-wm x- prefix to subtype indicates ‘experimental’ MIME type
© De Montfort University, Configuration: MIME video/mpegmpeg mpg mpe text/htmlhtml htm text/plainasc txt model/vrmlwrl vrml image/gifgif image/jpegjpeg jpg jpe Each MIME type tells the server what content type to send back for a particular file extension
© De Montfort University, Admin: Server Logs Server keeps log files to record activity –access log - who requested what –error log - pages not found, scripts not working etc. Often become very large very quickly - rotation
© De Montfort University, Admin: server logs Log analysis –Top hits (month/week/day/hour) –Typical search words used –Main referrers –Top hosts – who/where –Top user agents (IE/NS/Opera) off-the-shelf packages available (e.g. analog) -- often provided with hosted service