Web Servers
Web Servers
21.7 21.8
21.9
Objectives
In this lesson, you will learn:
To understand a Web servers functionality. To introduce Apache Web server. To learn how to request documents from a Web server.
21.1 Introduction
Web server
Responds to client requests by providing resources
URI (Uniform Resource Identifier) Web server and client communicate with platform-independent Hypertext Transfer Protocol (HTTP)
21.1 Introduction
Apache Web server Company Apache Software Foundation Version 2.0.47 Released 7/10/03 Platforms Windows NT/2000/XP, Mac OS X, Linux and other UNIX-based platforms, experimentally supports Windows 95/98 Brief The most popular The newest release of Currently the most description Web server for IIS from Microsoft. popular Web server. Windows 2000. Price Included with Included with Freeware. Windows 2000 Windows Server 2003 and Windows XP. Fig. 21.1 Web servers discussed in this chapter.
5
GET http://www.kelley.indiana.edu/ardennis/home.htm HTTP/1.1 ]- Request Line Date: Mon 06 Aug 2001 17:35:46 GMT User-Agent: Mozilla/6.0 ]- Web browser (this is Netscape) Request Header Referer: http://www.indiana.edu/~aisdept/faculty.htm
URL that contained the link to the requested URL
HTTP/1.1 200 OK ]- Response Status Date: Mon 06 Aug 2001 17:35:46 GMT ]- Date Server: NCSA/1.3 ]- Web server Location: http:// www.kelley.indiana.edu/adennis/home.htm ]- URL Content-type: text/html ]- Type of file <html> <head> <title>Allen R. Dennis</title> </head> <body> <H2> Allen R. Dennis </H2> <P>Welcome to the home page of Allen R. Dennis</P>
</body> </html>
Response Header
Response Body
10
POST
Sends form data in the HTTP requestinvisible to users Virtually no limit (but check your specific configuration) Results are not cacheable or bookmarkable
11
Middle tier
Implements business logic and presentation logic Control interactions between application clients and application data
13
Server-side scripts
Executed on server Generate custom response for clients Wide range of programmatic capabilities Access to server-side software that extends server functionality
14
15
Global access
Register a human-readable domain name Obtain IP address
Static: Costs more Dynamic: Needs dynamic DNS system, e.g. http://www.dyndns.com/
16
Develop website locally Upload website via FTP for global access
E.g. Filezilla
17
Others:
WAMP: Uses Windows for operating system, with Apache, MySQL, and PHP WISA: Full Microsoft package
Windows Internet Information Server (IIS) SQL Server (enterprise) or Access (small-scale) ASP or ASP.NET
18
19
Installing EasyPHP
Download EasyPHP, and follow the installation instructions In addition, move the <mysql> and <phpmyadmin> folders into the <www> folder in the EasyPHP installation folder For Windows 95, make the following adjustments before starting EasyPHP:
Download the Windows NT patch, rename it to EasyPHP.exe, and replace the existing EasyPHP.exe Open DOS prompt, go to the EasyPHP installation folder, and run <easyphp /install>
Run EasyPHP in Windows, and it will start Apache and MySQL (PHP and PHPMyAdmin do not need to start)
Note that Windows 95 might show that Apache is not working, though actually it is working
21
Enter PHP documents location in Address field, starting with http://localhost/ or http://127.0.0.1/
22
Fig. 21.15
Fig. 21.23
23
24
References
Fitzgerald, Jerry and Alan Dennis, 2005. Business Data Communications and Networking. 8th edition. Wiley: New York.
25