Download presentation
Presentation is loading. Please wait.
Published bySamantha Haynes Modified over 9 years ago
1
2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal Web Server Overview 24.3Microsoft Personal Web Server Setup 24.4Getting Started with Microsoft Personal Web Server 24.5Microsoft Internet Information Server (IIS) 24.6Apache Web Server 24.7W3C Jigsaw Web Server 24.8Web Server Error Codes
2
2000 Deitel & Associates, Inc. All rights reserved. 24.1 Introduction Network –Allows two or more computers to communicate and share resources –Any network requires servers Manage access to files, folders, hardware and software Web server –Network server that manages access to files, folders and other resources over Internet or local Intranet via HTTP HTTP: HyperText Transfer Protocol –Client-server protocol (like FTP) –Handle permissions –Execute programs –Keep track of directories and files –Communicate with client computers
3
2000 Deitel & Associates, Inc. All rights reserved. A Web server communicating with several HTTP clients
4
2000 Deitel & Associates, Inc. All rights reserved. Web servers discussed in this chapter
5
2000 Deitel & Associates, Inc. All rights reserved. 24.2 Microsoft Personal Web Server Overview Microsoft Personal Web Server (PWS) –Use Internet Database Connector (IDBC), CGI and ASP –Capabilities: 1.Webs published as whole with single command 2.Publish Web sites from local computer to remote computer, from remote computer to local computer, or between remote Web sites 3.CGI, IDC, ASP and Microsoft Internet Server Application Programming Interface (ISAPI) programs and FrontPage WebBots 4.“smart” web management –Publish “changed pages only” option 5.Sets permissions and properties of webs and folders 6.Sets up virtual directories on server 7.Browse webs from another computer when you are logged on
6
2000 Deitel & Associates, Inc. All rights reserved. 24.3 Microsoft Personal Web Server Setup 1.Verify presence of Microsoft TCP/IP Protocol 2.Install PWS Software
7
2000 Deitel & Associates, Inc. All rights reserved. 24.4 Getting Started with Microsoft Personal Web Server 1. Start Personal Web Server 2. Test for Successful Installation of PWS Loopback address Virtual address allows testing of computer’s TCP/IP stack from same computer http://127.0.0.1 Default Web site page for PWS
8
2000 Deitel & Associates, Inc. All rights reserved. 24.4 Getting Started with Microsoft Personal Web Server (II) 3. Create a Web Site on Your Own Computer –Create root web Root web: web that is top-level content directory of Web server By default, home directory is C:\Webshare\Wwwroot 4. Access PWS from Other Computers –Address is http:// followed by IP address of server 5. Publish Information and Applications –Server can contain anything from static pages to interactive applications –Interact with databases 6. Prepare Information for Publishing –HTML
9
2000 Deitel & Associates, Inc. All rights reserved. 24.4 Getting Started with Microsoft Personal Web Server (III) 7. Publish Dynamic Applications –Run applications or scripts Remote users start by clicking HTML links or forms Perl, C CGI (Common Gateway Interface) ISAPI –Dynamic Link Libraries (DLLs) –Require less overhead than CGI scripts –Microsoft-specific technology –Place scripts in /Scripts directory –Adjust permissions
10
2000 Deitel & Associates, Inc. All rights reserved. 24.4 Getting Started with Microsoft Personal Web Server (IV) PWS extension interpreters (Windows 95/98) Personal Web Manager dialog
11
2000 Deitel & Associates, Inc. All rights reserved. 24.4 Getting Started with Microsoft Personal Web Server (V) 8. Publish information and use a database –Open Data Base Connectivity (ODBC) drivers Allow inserts, updates and deletes of info in database –Structured Query Language (SQL) commands –Internet Database Connector (IDC) component of PWS, Httpodbc.dll Internet Database Connector (.idc ) files HTML extension (.htx ) files –Template for actual HTML document returned to browser after database info merged by Httpodbc.dll
12
2000 Deitel & Associates, Inc. All rights reserved. 24.4 Getting Started with Microsoft Personal Web Server (V) 8. Publish information and use a database –Create system DSN (Data Source Name) –http://127.0.0.1/customers.idc? Question mark tells server request can take parameters
13
2000 Deitel & Associates, Inc. All rights reserved. Outline customers.idc file 1Datasource:NWIND 2Template:Customers.htx 3SQLStatement:SELECT * FROM [Customers] 4Password: 5Username:
14
2000 Deitel & Associates, Inc. All rights reserved. Outline 1.Create HTML template for actual document that will be returned to browser 1 2 3 4<META HTTP-EQUIV = "Content-Type" 5CONTENT = "text/html; charset = windows-1252"> 6 Customers 7 8 9 10 11 Customers 12 13 14 15 <FONT SIZE = 2 16FACE = "MS Sans Serif" COLOR = #000000>CustomerID 17 <FONT SIZE = 2 18FACE = "MS Sans Serif" COLOR = #000000>CompanyName 19 <FONT SIZE = 2 20FACE = "MS Sans Serif" COLOR = #000000>ContactName 21 <FONT SIZE = 2 22FACE = "MS Sans Serif" COLOR = #000000>ContactTitle 23 <FONT SIZE = 2 24FACE = "MS Sans Serif" COLOR = #000000>Address 25 <FONT SIZE = 2 26FACE = "MS Sans Serif" COLOR = #000000>City 27 <FONT SIZE = 2 28FACE = "MS Sans Serif" COLOR = #000000>Region 29 <FONT SIZE = 2 30FACE = "MS Sans Serif" COLOR = #000000>PostalCode 31 <FONT SIZE = 2
15
2000 Deitel & Associates, Inc. All rights reserved. Outline Notice placeholders for database fields 32FACE = "MS Sans Serif" COLOR = #000000>Country 33 <FONT SIZE = 2 34FACE = "MS Sans Serif" COLOR = #000000>Phone 35 <FONT SIZE = 2 36FACE = "MS Sans Serif" COLOR = #000000>Fax 37 38 39 40 41 42 43 <FONT SIZE = 1 FACE = "MS Sans Serif" 44COLOR = #800000> 45 <FONT SIZE = 1 46FACE = "MS Sans Serif" COLOR = #800000> 47 48 <FONT SIZE = 1 49FACE = "MS Sans Serif" COLOR = #800000> 50 51 <FONT SIZE = 1 52FACE = "MS Sans Serif" 53COLOR = #800000> 54 <FONT SIZE = 1 55FACE = "MS Sans Serif" COLOR = #800000> 56 57 <FONT SIZE = 1 58FACE = "MS Sans Serif" COLOR = #800000> 59 60 <FONT SIZE = 1 61FACE = "MS Sans Serif" COLOR = #800000> 62
16
2000 Deitel & Associates, Inc. All rights reserved. Outline 63 <FONT SIZE = 1 64FACE = "MS Sans Serif" COLOR = #800000> 65 66 <FONT SIZE = 1 67FACE = "MS Sans Serif" COLOR = #800000> 68 69 <FONT SIZE = 1 70FACE = "MS Sans Serif" COLOR = #800000> 71 72 <FONT SIZE = 1 73FACE = "MS Sans Serif" COLOR = #800000> 74 75 76 77 78 79 80 81 82
17
2000 Deitel & Associates, Inc. All rights reserved. customers.idc as requested and displayed in a Web browser
18
2000 Deitel & Associates, Inc. All rights reserved. 24.5 Microsoft Internet Information Server (IIS) Internet Information Server (IIS) –Extends Windows NT server to Intranets and Internet –Provides full Intranet and Internet Web capabilities –Publish information –Access to data stored in various client/server databases –Supports CGI CGI creates separate process for every request Microsoft alternative: ISAPI –Back-end database access and programming IDC connects to back-end ODBC databases –Insert, update, delete, etc. Internet Service Manager –GUI manager
19
2000 Deitel & Associates, Inc. All rights reserved. 24.6 Apache Web Server Apache –Leading UNIX Web server –High-performance httpd (HTTP daemon) server Daemon: UNIX background process that implements server side of a protocol –Server-side programming tools and languages: Perl PHP3 –Scripting language that allows embedding scripting code into HTML pages Tcl Python –Access to Java Servlet API –JSP (JavaServer Pages) Embed java code within HTML templates dynamic pages processed entirely by server
20
2000 Deitel & Associates, Inc. All rights reserved. 24.6 Apache Web Server (II) –Modules provide additional functionality http://modules.apache.org/ mod_SSL –Strong cryptography for Apache 1.3 Web server via Secure Sockets Layer mod_perl –Modules can be written entirely in Perl Jserv –Module that implements Sun’s Java Servlet API –On Windows NT Apache Web server run as console application or service –Console application: stopping and starting server is manual –Service: Apache starts whenever operating system starts
21
2000 Deitel & Associates, Inc. All rights reserved. 24.6 Apache Web Server (III) Starting the Apache Web Server as a console application Default Web site for Apache Web Server
22
2000 Deitel & Associates, Inc. All rights reserved. 24.7 W3C Jigsaw Web Server W3C Jigsaw –Free Web server written entirely in Java –Runs on most machines that support Java Microsoft Windows 95/98/NT Sun Microsystems’ Solaris Linux –Object-oriented Web server –Major components: Daemon module –Deals with HTTP –Handles incoming connections –Creates new client objects –Decodes requests –Sends replies Resource module –Manages information space of server
23
2000 Deitel & Associates, Inc. All rights reserved. Jigsaw batch installation process
24
2000 Deitel & Associates, Inc. All rights reserved. Default Web site page for the Jigsaw Web server
25
2000 Deitel & Associates, Inc. All rights reserved. JigAdmin authorization dialog and general properties page
26
2000 Deitel & Associates, Inc. All rights reserved. JigAdmin Web configuration page
27
2000 Deitel & Associates, Inc. All rights reserved. 24.8 Web Server Error Codes W3C’s HTTP specification –Identifies specific errors that can be returned in Web server’s response to HTTP requests –All HTTP-compliant Web servers support these as well as HTTP status codes –Common numeric error status codes:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.