Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Week 6 The lynx browser Apache Web Server John Wang With materials courtesy of Inge Mclaurin.

Similar presentations


Presentation on theme: "1 Week 6 The lynx browser Apache Web Server John Wang With materials courtesy of Inge Mclaurin."— Presentation transcript:

1

2 1 Week 6 The lynx browser Apache Web Server John Wang With materials courtesy of Inge Mclaurin

3 2 The Catalyst for W3 In 1990, while working for Europe’s high energy physics research lab (CERN), Tim Berners-Lee began to create the basic W3 infrastructure. CERN’s problem: 1.Results of costly experiments were kept in different formats on different computers. 2.There was high turn-over rate in CERN. New staff often could not find valuable data left by people who departed. They were “losing” information.

4 3 The Philosophy Behind W3 Tim Bernes-Lee proposed “Hypertext” system to organize information. 1.Different files can still be kept on different servers 2.An “index” can link files and information together. This index can direct the end-users to diverse pieces of info on different servers. 3.Users can jump from link to link without any hierarchical restriction.

5 4 W3 Infrastructure Two main components: (2) Client browser program (e.g. Lynx, Microsoft Explorer), resides on end-user computers. (1) Web servers (e.g. Apache server), storing information in Hypertext Markup Language (HTML).

6 5 Daemon “a process that runs in the background and performs a specified operation at predefined times or in response to certain events.” The term daemon is a UNIX term Microsoft Windows refers to daemons as System Agents and services. Source: webopedia.com

7 6 Daemon A daemon is a program that 1. runs continuously 2.exists for the purpose of handling periodic service requests that a computer system expects to receive. The daemon program forwards the requests to other programs Source: techtarget.com

8 7 Why do we need to know about “Daemons”? because... Each server of pages on the Web has an HTTP Daemon that continually waits for requests to come in from Web clients and their users. Source: techtarget.com

9 8 The Lynx Browser The Lynx browser is a text-based web browser. http://lynx.isc.orghttp://lynx.isc.org Lynx browser is already installed on zenit. –Telnet into zenit.senecac.on.ca –type “lynx” followed by the website you want to visit, and press ENTER. $ lynx www.apache.org

10 9 Visiting “apache.org” with lynx

11 10 In the beginning… CERN CERN’s original http server was used by all early websites (1991 ~ 1993) It was considered to be a big and complex piece of software.

12 11 New Kid on the Block… NCSA Only about 200 websites existed in 1993, when National Center for Supercomputing Applications (University of Illinois) released NCSA Mosaic. Mosaic was the first readily available graphical web browser. NCSA team wanted to create a small web server - so NCSA httpd was born. It quickly became the most popular web server.

13 12 The Apache Web Server Lots of NCSA Mosaic/httpd project team members (mostly students) went to form Netscape company in 1994. NCSA httpd development slowed down, and security holes were not addressed quickly. Web administrators around the world shared their changes & modification (patches) of the NCSA httpd. They called their effort “A PAtCHy server”, which became “APACHE”

14 13 The Apache Web Server By 1995, there were hundreds of volunteers re-writing and improving the software, making APACHE faster and better. Apache has been the most popular web server on the Internet since April of 1996. (Latest Netcraft survey showed that 60% of all websites use Apache. Second place is Microsoft at 30%.) Source: www.netcraft.com/survey/

15 14 Apache Design Philosophy Apache teams wanted to make the software: 1.Open-source: anyone can examine the software code 2.Modular: different add-on (or “mod”) can be developed independently 3.OS independent: Apache is available on many different platforms (Windows, Netware, Unix variances)

16 15 Directories & Important Files apachectl / home i120???? HOME binpasswordlogshtdocsconf cgi-bin httpd.conf.defaulthttpd.conf index.html httpd.pid.htaccess.htpassword httpd error_logaccess_log

17 16 The conf directory The conf directory contains the files used to configure apache. / home i120???? HOME conf httpd.conf.default httpd httpd.conf

18 17 The httpd.conf file The httpd.conf file is used to configure apache. The httpd.conf.default file is a back-up copy of the httpd.conf file. / home i120???? HOME conf httpd.conf.default httpd httpd.conf

19 18 The bin directory “bin” is short for “binary”. The compiled Apache binary files are stored in this directory. It contains the file apachectl. / home i120???? HOME httpd apachectl bin

20 19 The apachectl file apachectl is a program that starts, restarts or stops your Apache daemon/server. The file name is “apache” followed by “ctl” which stands for ConTroL / home i120???? HOME httpd apachectl bin

21 20 The htdocs directory The htdocs directory contains the files that will be displayed on your webpage. For example: –HTML pages –Graphics files –PDF files / home i120???? HOME httpd htdocs index.html.htaccess

22 21 The index.html file The index.html file is the “default” HTML page for a website. If the users enters the URL of a site without specifying a HTML page, index.html will be displayed. / home i120???? HOME httpd index.html.htaccess htdocs

23 22 The index.html file Example: http://www.senecac.on.ca is really.... http://www.senecac.on.ca/index.html http://www.senecac.on.ca/index.html

24 23 The logs directory The logs directory contains files that are logs of events that happen to your server. / home i120???? HOME httpd logs httpd.pid error_log access_log

25 24 A note on PID numbers A process is the execution of a command by the UNIX system. UNIX assigns a unique process identification (PID) number at the creation of each process. As long as a process is in existence, it keeps the same PID number.

26 25 The httpd.pid file When your server is running it will contain a file called httpd.pid. This file contains the PID of the running server. / home i120???? HOME httpd logs httpd.pid error_log access_log

27 26 The error_log file The error_log file contains a log of all error message generated by your server. If you are having difficulty with your server this is the first place you look when trouble-shooting. / home i120???? HOME httpd logs httpd.pid error_log access_log

28 27 Hint! Whenever you have any problem with your Apache Server......the first thing to do is to check your “log files”

29 28 The access_log file The access_log file contains a log of everyone who logs into your server. / home i120???? HOME httpd logs httpd.pid error_log access_log

30 29 apachectl / home in120??? HOME bin password logshtdocsconfcgi-bin httpd.conf.defaulthttpd.conf index.html httpd.pid.htaccess.htpassword httpd error_logaccess_log password protection

31 30 The password directory In the lab you are asked to create a password directory. This is the directory that will store all the password files. / home i120???? HOME httpd password.htpassword

32 31 The htpassword file In the lab you are asked to create a.htpassword file. This is the file that will store all the passwords you will create. / home i120???? HOME httpd password.htpassword

33 32 The.htaccess file You will also create the.htaccess file in htdocs directory. Its password protects the directory it is stored in. / home i120???? HOME httpd htdocs index.html.htaccess

34 33 Working with your Apache Server Read all the instructions Follow all the instructions Do one step at a time Save Often Once completed delete everything and do it all again, and again, and again. Keep redoing it until you can do it without help, and without the written instructions.

35 34 Remember...”Ports”? In TCP/IP networking, “port” is not the same as physical/hardware port (e.g. parallel port, serial port) "logical connection place" and specifically, using the Internet's protocol, TCP/IP, the way a client program specifies a particular server program on a computer in a network.TCP/IP Source: techtarget.com

36 35 Port Port numbers are from 0 to 65536. Ports 0 to 1024 (well-known ports) are reserved for use by privileged services. These include telnet, ftp, nntp, etc. For the HTTP service, port 80 is defined as a default and it does not have to be specified in the URL. Example: http://zenit.senecac.on.cahttp://zenit.senecac.on.ca is really http://zenit.senecac.on.ca:80http://zenit.senecac.on.ca:80

37 36 http://zenit.senecac.on.ca/ ~i1201g45/ Your HTML pages on Zenit You now access your “public_html” directory through port 80 on Zenit. /home/i1201g45/ public_html/index.html ZENIT

38 37 http://zenit.senecac.on.ca:7449 Running Apache on zenit By installing Apache in your zenit directory, you need to use an unique port number. Please check my website for your port number. /home/i1201g45/httpd/ htdocs/index.html ZENIT


Download ppt "1 Week 6 The lynx browser Apache Web Server John Wang With materials courtesy of Inge Mclaurin."

Similar presentations


Ads by Google