Professional Documents
Culture Documents
Roadmap
Introduction HTTP URL HTML CGI Apache Server Installation Squid Cache Server Q&A
Introduction
Clients
Mosaic, Netscape, Mozilla, Firefox, Opera, Konqueror, Epiphany, IE, Safari, etc Link, wget, emacs, telnet, etc
Text
HTTP
http
80/tcp
www
HTTP (cont)
$ telnet www.cs.ucr.edu 80 Trying 138.23.169.15... Connected to www.cs.ucr.edu. Escape character is '^]'. GET / HTTP/1.0 HTTP/1.1 200 OK Date: Mon, 16 Jul 2007 20:47:38 GMT Server: Apache/2.2.3 (CentOS) Last-Modified: Mon, 16 Jul 2007 20:08:44 GMT ETag: "889f0f-d5-71bab00" Accept-Ranges: bytes Content-Length: 213 Connection: close Content-Type: text/html; charset=UTF-8
URL
http://www.cs.ucr.edu:80/~weesan/index.html http protocol/application www.cs.ucr.edu hostname 80 port ~weesan/ - directory Index.html - filename
URL (cont)
Other protocols
file
file://etc/passwd
ftp
ftp://ftp.slackware.com/pub/slackware/slackware-12.0/
https://www.cs.ucr.edu/ mailto:weesan@cs.ucr.edu
https
mailto
HTML
</head> <body>
<a href=mailto:weesan@cs.ucr.edu>Me</a>
</body>
CGI
Common Gateway Interface A way to communicate with external programs and generate pages dynamically Example of external scripts/programs:
http://www.apache.org/ $ yum install httpd Files are distributed all over the places
$ /etc/init.d/httpd start
$ /etc/init.d/httpd restart $ /etc/init.d/httpd stop $ chkconfig --level 2345 httpd on
http://www.squid-cache.org/ A free version spawned from Harvest Cache Project from USC, which became NetCache, and 8 months later, it was acquired by NetApp Caches objects locally
Fast, not process forking for new connections Supports Hierarchy Caching Listen on port 3128
$ telnet cache.cs.ucr.edu 3128 Trying cache.cs.ucr.edu... Connected to cache.cs.ucr.edu. Escape character is '^]'. GET http://www.cs.ucr.edu/~weesan/cs183/login.php HTTP/1.0 Host: www.cs.ucr.edu
HTTP/1.0 200 OK Date: Thu, 08 May 2008 07:11:19 GMT Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.1.6 Content-Type: text/html; charset=UTF-8 X-Cache: MISS from cache.cs.ucr.edu Via: 1.0 cache.cs.ucr.edu:3128 (squid/2.6.STABLE14) Proxy-Connection: close
.edu .com
.net
Accelerator Mode
Transparent Caching
Reference
LAH