Introduction to Web Site Development

Matt Mahoney,

What you need to know to set up a web site

Web Services

Dial-up Account

Web Server Account


Unix file system

Start web server: /etc/httpd/httpd &

Edit Joe’s home page: vi ~joe/public_html/index.html

List CGI scripts: cd /etc/httpd/cgi-bin; ls -las

1  drwxr-xr-x  nobody  .           Apr  4
1  drwx--x--x  root    ..          Dec 12
3  -rwxr-xr-x  joe  Oct  2


Layered network model

4 layer network model

Application-level services

Service Client Protocol TCP port
Web netscape, explorer, ... HTTP 80
Forward mail sendmail SMTP 25
Receive mail mail, ... POP
Remote login telnet, rlogin, rsh telnet 23
Transfer files ftp FTP 20, 21
Host name = IP address resolver, nslookup DNS
USENET rn, ... NNTP 119
Test host/network ping ICMP

Try this:

telnet 80
GET /index.html

Example HTTP session captured with Snort.

Web Servers

UNIX Servers

Directory setup



Web Client History


Parts of a URL

Check here:

Data is received by on in /cgi_bin would mail the information to you. Use <form method=POST>

Other URL protocols

HTTP Protocol

HTTP Protocol

File Type MIME Type Viewer/Plugin
.html, .htm text/html
.gif image/gif
.jpeg, .jpg image/jpeg
.pdf application/pdf acrobat
.ps application/postscript ghostview
.gz application/x-gzip gunzip
.Z application/x-compress uncompress
.zip application/x-zip unzip, pkunzip
.ra, .ram audio/x-pn-realaudio realaudio
.qt, .mov video/quicktime quicktime

HTTPS Protocol

Encrypted transfers to prevent interception at intermediate hosts. Netscape displays a blue border and solid key.

HTTPS Protocol

HTML Examples

After viewing each page, click on View/Source in your browser to examine the HTML.



# Read the cookie
$cookie = $ENV{HTTP_COOKIE};  # "name=Matt;"

# Write a cookie
print "Content-type: text/html
set-cookie: name=Matt; expires: Sat Jan  1 00:00:00 2001;

<HTML> etc...";

# Read other useful data
$host = $ENV{REMOTE_HOST};  # ""
$addr = $ENV{REMOTE_ADDR};  # ""

\windows\cookies directory (Internet Explorer) or \program files\netscape\navigator\cookies.txt (Netscape)


JavaScript CANNOT

Javascript CAN

Javascript 1.1 (Netscape 3.0, IE 4.0)


Use View/Source in your browser to see the JavaScript source code.

Continue to next section (Java)