How to Publish HTML in various environments

Several people have come to me in recent weeks asking how to publish materials on the web.  This essay describes how to do that in several of the environments I work in.
Table of Contents

A list of environments this essay considers
How to write the HTML
How to publish the HTML
  Using Netscape Composer
  Using FTP
  Using Front Page
  A table of publishing locations
Glossary

The environments

Table of environments I am interested in
 
Environment Web Server Operating system Samba (or SMB) Intranet path world wide web path CGI path
Commercial Vent Vac Apache Linux yes none ~/public_html /homes/httpd/html/cgi-bin
Meridian School Apache Linux ? ?

The Cyberstation Microsoft IIS Windows/NT no ? ? ?
The University of Washington College of engineering, Electrical Engineering Dept., Research Computing Systems (UWEERCS) NCSA (but we're migrating to Apache) Solaris yes /homes/httpd ~/public_html requires permission
Summit School (K-12) Apache Linux not yet /home/httpd not yet requires permission

How to write the HTML

Normally, you write HTML using an HTML editor such as Netscape Composer, Amaya http://www.w3.org/Amaya/Icons/w3c-amaya.gif, Microsoft Word for Windows, Microsoft Front Page, or Hot Dog, just to name a few.

You can write HTML in a flat ASCII text editor such as vi, edit, edlin, TECO, EDT, etc., but only if you know HTML. Sometimes, you might do this because there are some things you can do at the raw HTML level that you can not do with an HTML editor. For example, the "this document last modified" script was done in WordPad. I like the O'Reilly book on HTML, which is available from O'Reilly, Barnes and Noble. and Amazon.com. Microsoft has its own HTML tutorial.  You can also learn how to typeset mathematics from w3c.

I found the following list of HTML authoring resources at my friend Mary Lou Stewart's web page:

However, if you know how to program, you can also generate your HTML on the fly. There are also packages to make this easier, such as ECS for Java, TBD for perl, and TBD for C (but you may also generate HTML in FORTRAN, COBOL, BASIC, or SQL).

Links and linking

The reason why the World Wide Web is called that is because the documents on the web form links to one another.  If one were to build a map of how the documents linked to each other, then the links would cross and recross many times, so it would wind up looking like a web.  You want your documents to be the targets of links (or at least, you ought to - there are some people who have a misguided sense of what the web is all about and they sue people who link without permission - go figure).  To be fair, you should create links in your documents to other people's documents.  At the very minimum, you should have a link to your home page, or, links to your home pages if you have more than one.

CGI scripting and other HTTP based interactivity

HTML is great for publishing static content, that is, material that doesn't change very often.  However, HTML can also be used for dynamic content, which changes under software control.  That is really beyond the scope of this essay.  However, for an example of the germ of how to do it, look at http://www.summit.seattleschools.org/cgi-bin/testenv .

How to publish the HTML

Once the HTML is written, you have to publish it. Publishing HTML means moving the HTML files into the appropriate places so that the web server can find it. The web browser maintains a map from internal paths to external URLs. Also, there are file system mapping tools which create aliases for PCs (or Macintoshes) which point to these files. For example, the Mathsoft web server, dap.statsci.com, has mapped each users' intranet_html directory to the URL http://dap.statsci.com/username. For example, my web page is at http://dap.statsci.com/~jeffs (You won't be able to see it if you are outside the firewall) according to the web server but at ~jeffs/intranet_html according to the UNIX system and \\homer\jeffs\intranet_html according to the PCs.

Publishing remotely using FTP

If your website is remote to where you are, then you have to moving the files using FTP or some other File Transfer Protocol. FTP also maps directories into the file system (this is a safety measure-you can't corrupt files you can't see). These instructions are for "generic" FTP clients - there are other easy to use FTP clients out there such as WINFTP.
ftp serverName
username: your user name
password: your password (which is not echoed)
ascii
hash on
lcd current location on my local machine
cd publish location on server
put filename
continue to put files until done
quit

Alternatively, if you have a lot of files to move, you may use the mput command instead of the put command; the mput command accepts wildcards.  Find serverName and publish location on server in the table below.  Mathsoft protects its servers with a firewall, that is inpenetrable unless you run the ssh protocol.  I have a tutorial on ssh.

Here is an example of publishing using an FTP transfer from my local Linux machine, angel, to the server at summit.seattleschools.org.
[jeffs@angel jeff]$ ftp summit.seattleschools.org
Connected to summit.seattleschools.org.
220 summit.seattleschools.edu FTP server (Version wu-2.4.2-VR17(1) Mon Apr 19 09
:21:53 EDT 1999) ready.
Name (summit.seattleschools.org:jeffs): jeffs
331 Password required for jeffs.
Password:
230 User jeffs logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> passive
Passive mode on.
ftp> hash
Hash mark printing on (1024 bytes/hash mark).
ftp> lcd public_html
Local directory now /home/jeff/public_html
ftp> cd public_html
250 CWD command successful.
ftp> pwd
257 "/home/jeffs/public_html" is current directory.
ftp> !pwd
/home/jeff/public_html
ftp> put publish_instructions.html
local: publish_instructions.html remote: publish_instructions.html
227 Entering Passive Mode (216,186,55,129,177,210)
150 Opening BINARY mode data connection for publish_instructions.html.
###############
226 Transfer complete.
15818 bytes sent in 0.00718 secs (2.2e+03 Kbytes/sec)
ftp> ls *.html
227 Entering Passive Mode (216,186,55,129,113,229)
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> quit
221-You have transferred 15818 bytes in 1 files.
221-Total traffic for this session was 16556 bytes in 2 transfers.
221-Thank you for using the FTP service on summit.seattleschools.edu.
221 Goodbye.
You have new mail in /var/spool/mail/jeffs
[jeffs@angel jeff]$
First, I invoked the FTP program on my local computer, angel, and connected to the server at Summit.  Then I logged in as jeffs.  The passive command is used to get past the firewall which protects all of the Seattle public schools from the outside world (however, the Seattle Public Schools are still vulnerable to bad guys within the school).  Next, I change the directory on my local machine (lcd) to be public_html, and on the remote machine (cd) to be public_html.  The pwd command prints the working directory on the remote machine, while !pwd prints the working directory on the local machine.  Finally, I transfered (put) the file from the local machine to the remote machine.
Note that the MS-DOS version of FTP is brain damaged: it doesn't have a passive mode.  So you can't FTP to the summit server using MS-DOS FTP.

Publishing remotely using Netscape Composer

When you are ready to publish in Netscape Composer, first save the file (the publishing process is buggy and tends to crash).  Click on the file menu click on publish.  A dialog box will open: .  Set the HTTP: or FTP: location to publish to FTP://serverName/publish location Don't use HTTP: as that isn't supported on most web servers.  Fill in the username and password and list any related files that need uploading (composer is pretty good about figuring out which files need uploading).

Publishing Remotely using Microsoft Front Page

TBD

Table of publishing locations

Your system administrator maintains the maps between the URLs and the publish locations (using the file httpd.conf and srm.conf in Apache, using the IIS Management Console in IIS).

 
The following table gives the URLs and publish locations for various projects I am involved with or that people I work with are involved with: 
Usage URL Publish Location on server
Commercial Vent Vac home page (for use by Chris Racus only) http://www.commercialventvac.com on angel.commericalventvac.com; /homes/httpd/html
My personal home page http://www.commercialventvac.com/~jeffs on angel.commericalventvac.com; login as jeffs and cd to public_html
My CGI script alias http://www.commercialventvac.com/cgi-bin on angel.commercialventvac.com get the files to /home/httpd/cgi-bin .  It is not possible to load an file into the cgi-bin directory using FTP, you must be root.
Sarah's home page http://www.commercialventvac.com/~sarah on angel.commericalventvac.com; login as sarah and cd to public_html
The Talaria Web Page of Cancer Pain
http://www.painresearch.utah.edu/cancerpain/

My Java Servelets  http://www.commercialventvac.com/servlets
http://angelb/jserv/jserv_status (available only internally in my house)
/homes/jeff/public_html/servlets is mapped to the root zone.
Nicky Butler's home page http://www.commercialventvac.com/~goddess on angel.commericalventvac.com; login as goddess and cd to public_html
The Mathsoft Data Analysis Products (DAP) division intranet server http://dap.statsci.com
http://dap.statsci.com/~USERNAME
Use your own ~/intranet_html directory (UNIX side) or i:\intranet_html directory (PC side).  This assumes that you have set up a share from your UNIX directory to the i: drive
The cyberstation http://www.thecyberstation.com On ftp.jetinternet.com
The LauraLee Show http://www.lauralee.com On ftp.jetinternet.com
Meridian School http://www.meridianschool.edu
The Washington State Jewish Historical Society

All users on oz.net http://www.oz.net/~USERNAME
e.g. http://www.oz.net/~jeffsilv

Puget net http://www.puget.net
National Disaster Communication Response Team http://www.ndcrt.org

Glossary

 

Known Problems

As of this writing (1-Feb-2000) there are some known problems.




  Windows sucks, Linux rocks.  See http://srom.zgp.org/ for details