Instructions for setting up web pages

  1. Create the directories ~/public_html and ~/public_html/cgi-bin in your account.
  2. Set the permissions of your home directory to at least 711 (e.g., chmod og+x ~)
  3. Set the permissions of ~/public_html and ~/public_html/cgi-bin to 755

Creating a static web page

  1. Create a file in the directory ~/public_html (for example, foo.html).
  2. Set the permissions of foo.html to 644.
  3. Access the page at http://www.cs.nyu.edu/~yourid/foo.html (where yourid is your login).
If you create a file called index.html, you can access it with the shorter http://www.cs.nyu.edu/~yourid.

Creating a CGI script

  1. Create a file in the directory ~/public_html/cgi-bin (for example, foo.cgi).
  2. Set the permissions of foo.cgi to 755.
  3. Use the #! syntax in your script. If you are using ksh, copy the file /home/unixtool/cgi/cgi-lib.ksh to this directory. You should not have to copy any files to use the Perl CGI module.
  4. You can reference the CGI script as http://www.cs.nyu.edu/~yourid/cgi-bin/foo.cgi or http://cs1.cs.nyu.edu/~yourid/cgi-bin/foo.cgi

Examples

  1. Dictionary Search: HTML, Perl, KornShell.
  2. Environment Dump: HTML, Perl, KornShell.
  3. Upload a file: HTML, Perl.

Web Resources