Introduction server Construction

3,179 views
2,970 views

Published on

신입생들을 위한 길라잡이 세미나입니다.

서버구축관련 20기 왕찡위.

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,179
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
33
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction server Construction

  1. 1. WEB SERVERS Hanulso 23 기 왕찡위
  2. 2. WEB SERVERS (IIS AND APACHE) <ul><li>Outline </li></ul><ul><li>Introduction </li></ul><ul><li>2 HTTP Request Types </li></ul><ul><li>3 System Architecture </li></ul><ul><li>4 Client-Side Scripting versus Server-Side Scripting </li></ul><ul><li>5 Accessing Web Servers </li></ul><ul><li>6 Microsoft Internet Information Services (IIS) </li></ul><ul><li>6.1 Microsoft Internet Information Services (IIS) 6.0 </li></ul><ul><li>6.2 Microsoft Internet Information Services (IIS) 7.0 </li></ul><ul><li>7 Apache Web Server </li></ul><ul><li>8 Requesting Documents </li></ul><ul><li>8.1 XHTML </li></ul><ul><li>8.2 ASP.NET </li></ul><ul><li>8.3 PHP </li></ul><ul><li>9 Web Resources </li></ul>
  3. 3. OBJECTIVES <ul><ul><li>To understand a Web server’s functionality. </li></ul></ul><ul><ul><li>To introduce Apache Web server. </li></ul></ul><ul><ul><li>To learn how to request documents from a Web server. </li></ul></ul>
  4. 4. 1  INTRODUCTION <ul><li>Web server </li></ul><ul><ul><li>Responds to client requests by providing resources </li></ul></ul><ul><li>URI (Uniform Resource Identifier) </li></ul><ul><li>Web server and client communicate with platform-independent Hypertext Transfer Protocol (HTTP) </li></ul>
  5. 5. 1  INTRODUCTION
  6. 6. WEB SERVER ARCHITECTURE
  7. 7. HOW THE WWW WORKS
  8. 8. DOMAIN NAME SERVER SYSTEM
  9. 9. EXAMPLE OF AN HTTP REQUEST FROM A WEB BROWSER GET http://www.kelley.indiana.edu/ardennis/home.htm HTTP/1.1 Date: Mon 06 Aug 2008 17:35:46 GMT User-Agent: Mozilla/6.0 Referer: http://www.indiana.edu/~aisdept/faculty.htm Request Header ]- Request Line ]- Web browser (this is Netscape) Command URL HTTP version URL that contained the link to the requested URL
  10. 10. HTTP RESPONSE FROM A WEB SERVER <ul><li>HTTP/1.1 200 OK ]- Response Status </li></ul><ul><li>Date: Mon 06 Aug 2008 17:35:46 GMT ]- Date </li></ul><ul><li>Server: NCSA/1.3 ]- Web server </li></ul><ul><li>Location: http:// www.kelley.indiana.edu/adennis/home.htm ]- URL </li></ul><ul><li>Content-type: text/html ]- Type of file </li></ul><ul><li><html> </li></ul><ul><li><head> </li></ul><ul><li><title>Allen R. Dennis</title> </li></ul><ul><li></head> </li></ul><ul><li><body> </li></ul><ul><li><H2> Allen R. Dennis </H2> </li></ul><ul><li><P>Welcome to the home page of Allen R. Dennis</P> </li></ul><ul><li></body> </li></ul><ul><li></html> </li></ul>HTTP version Status code Reason Response Header Response Body
  11. 11. 2  HTTP REQUEST TYPES <ul><li>GET (default) and POST do basically the same thing: Send data from the client to the server. However, they have some differences: </li></ul><ul><li>GET </li></ul><ul><ul><li>Appends form data directly to the end of the URL —visible to users (not suitable for sending passwords) </li></ul></ul><ul><ul><li>Limited to 2,048 characters for the entire URL </li></ul></ul><ul><ul><li>Result page can be bookmarked and cached </li></ul></ul><ul><li>POST </li></ul><ul><ul><li>Sends form data in the HTTP request—invisible to users </li></ul></ul><ul><ul><li>Virtually no limit (but check your specific configuration) </li></ul></ul><ul><ul><li>Results are not cacheable or bookmarkable </li></ul></ul>
  12. 12. 3  SYSTEM ARCHITECTURE <ul><li>Multi-tier application ( n -tier application) </li></ul><ul><ul><li>Information tier (data or bottom tier) </li></ul></ul><ul><ul><ul><li>Maintains data for the application </li></ul></ul></ul><ul><ul><ul><li>Stores data in a relational database management system (RDBMS) </li></ul></ul></ul><ul><ul><li>Middle tier </li></ul></ul><ul><ul><ul><li>Implements business logic and presentation logic </li></ul></ul></ul><ul><ul><ul><li>Control interactions between application clients and application data </li></ul></ul></ul><ul><ul><li>Client tier (top tier) </li></ul></ul><ul><ul><ul><li>Application’s user interface </li></ul></ul></ul><ul><ul><ul><li>Users interact directly with the application through the client tier </li></ul></ul></ul>
  13. 13. N-TIER CLIENT-SERVER ARCHITECTURE
  14. 14. 4  CLIENT-SIDE SCRIPTING VERSUS SERVER-SIDE SCRIPTING <ul><li>Client-side scripts </li></ul><ul><ul><li>Validate user input </li></ul></ul><ul><ul><ul><li>Reduce requests needed to be passed to server </li></ul></ul></ul><ul><ul><ul><li>Access browser </li></ul></ul></ul><ul><ul><ul><li>Enhance Web pages with DHTML, ActiveX controls, and applets </li></ul></ul></ul><ul><li>Server-side scripts </li></ul><ul><ul><li>Executed on server </li></ul></ul><ul><ul><li>Generate custom response for clients </li></ul></ul><ul><ul><li>Wide range of programmatic capabilities </li></ul></ul><ul><ul><li>Access to server-side software that extends server functionality </li></ul></ul>
  15. 15. INSTALLING A WEB SERVER
  16. 16. HOSTING A WEBSITE: SELF HOSTING <ul><li>Install a web server on a computer </li></ul><ul><li>Local access </li></ul><ul><ul><li>Using domain <localhost> </li></ul></ul><ul><ul><li>or IP address 127.0.0.1 </li></ul></ul><ul><ul><li>Necessary for server-side programming development </li></ul></ul><ul><li>Global access </li></ul><ul><ul><li>Register a human-readable domain name </li></ul></ul><ul><ul><li>Obtain IP address </li></ul></ul><ul><ul><ul><li>Static: Costs more </li></ul></ul></ul><ul><ul><ul><li>Dynamic: Needs dynamic DNS system, e.g. http://www.dyndns.com/ </li></ul></ul></ul>
  17. 17. HOSTING A WEBSITE: HOSTING SERVICE <ul><li>Register a domain name </li></ul><ul><ul><li>Assign name servers </li></ul></ul><ul><ul><li>Host takes care of IP addressing </li></ul></ul><ul><li>Develop website locally </li></ul><ul><li>Upload website via FTP for global access </li></ul><ul><ul><li>E.g. Filezilla </li></ul></ul>
  18. 18. WEB SERVER ARCHITECTURE <ul><li>LAMP: Most popular—fully open source </li></ul><ul><ul><li>Linux for operating system </li></ul></ul><ul><ul><li>Apache for web server </li></ul></ul><ul><ul><li>MySQL for database </li></ul></ul><ul><ul><li>PHP for server-side scripting </li></ul></ul><ul><li>Others: </li></ul><ul><ul><li>WAMP: Uses Windows for operating system, with Apache, MySQL, and PHP </li></ul></ul><ul><ul><li>WISA: Full Microsoft package </li></ul></ul><ul><ul><ul><li>Windows </li></ul></ul></ul><ul><ul><ul><li>Internet Information Server (IIS) </li></ul></ul></ul><ul><ul><ul><li>SQL Server (enterprise) or Access (small-scale) </li></ul></ul></ul><ul><ul><ul><li>ASP or ASP.NET </li></ul></ul></ul>
  19. 19. 7  APACHE WEB SERVER <ul><li>Currently the most popular Web server </li></ul><ul><li>Stability </li></ul><ul><li>Efficiency </li></ul><ul><li>Portability </li></ul><ul><li>Open-source </li></ul>
  20. 20. ALL-IN-ONE APACHE/MYSQL/PHP PACKAGES <ul><li>APMSETUP (recommended) </li></ul><ul><ul><li>Includes PHPMyAdmin for administering MySQL database </li></ul></ul><ul><ul><li>Installation and configuration </li></ul></ul><ul><li>AbriaSoft Merlin Desktop Edition </li></ul><ul><ul><li>Includes PHPMyAdmin </li></ul></ul><ul><li>WAMP Server </li></ul><ul><li>PHP Triad </li></ul>
  21. 21. REQUESTING XHTML OR PHP DOCUMENTS <ul><li>Request PHP documents from Apache </li></ul><ul><li>Save PHP documents in the www folder for EasyPHP ( htdocs is the default Apache folder name) </li></ul><ul><li>Launch web browser </li></ul><ul><ul><li>With EasyPHP, right-click on the status bar icon and click “Local Web” </li></ul></ul><ul><li>Enter PHP document’s location in Address field, starting with http://localhost/ or http://127.0.0.1/ </li></ul>
  22. 22. 8.1 XHTML AND PHP Fig. 21.15 Requesting test.html from IIS 6 or Apache. Fig. 21.23 Requesting test.php from Apache.
  23. 23. THANK YOU

×