Creating a program that runs on the web at UCSC on a CSE computer is relatively easy. The first step is to simply verify that you have an account, and to create a home page for yourself. To do this log in and issue the following commands:
|
The next step is to make a program that runs on the Web. To do this issue the following commands:
|
The World Wide Web uses URLs (Uniform Resource Locators) to find web pages. The URL for my home page is http://www.cse.ucsc.edu/~kent/index.html. The "http://www.cse.ucsc.edu" part tells a web browser what computer (and what communications protocol) to get the page from. The "~kent/index.html" tells the web server software running on that computer where to find the file that contains the web page. In this case the web server does a little translation to change ~kent/index.html to ~kent/.html/index.html. (This lets you keep your files not in the .html directory private from web surfers.) The web server treats files in the cgi-bin directory as programs. It executes cgi-bin programs and treats the program output as a web page. Cgi-bin programs can be shell scripts (like the hello program above), Perl scripts or compiled executable programs. Our web server runs on a Sun Sparc named ftp.cse.ucsc.edu, so compiled programs must be in Sparc format.
This tutorial has just given you a very small taste of web programming. Here are some links if you would like to learn more.