Converting to HTML
If you have already created a document in LaTeX, WordPerfect, etc., then you may want to convert it to HTML rather than
starting from scratch.
- Wordperfect or Microsoft Word
The best way to convert Wordperfect or Microsoft Word documents is to upgrade to the newest version. Each has the ability to
"save as HTML." (Note: equations will be converted to gifs.)
- LATeX
We have a converter installed on gauss. Login to gauss and type "latex2html filename.tex". The program will create a
subdirectory containing all the html files and graphics. (Note: equations will be converted to gifs.) Move this directory
beneath your public_html directory.
- Other formats
See the HTML Converters FAQ
Password Protection
Our web server allows you to control who can access different directories. I use it to give my students access to their
grades.
Note that the following methods of access control can work independently, or be combined.
The .htaccess file (NOT htaccess.txt) is a hidden file, use ls -a to see hidden files within a directory.
- Host Filtering
- Host filtering is used to limit document trees to certain machines, most likely local machines or those directly involved
in a project.
- For example, I have some documents which are for people in the Math Department
only. If you are not from a machine in math.montana.edu, you can't access them.
- This is acomplished by placing a file called .htaccess in the directory that contains the document. Note that now ALL
documents in that directory and in all sub-directories are protected.
In this case, the .htaccess file contains:
AuthUserFile /dev/null
AuthType Basic
AuthGroupFile /dev/null
AuthName "Example Allow From MATH"
<Limit GET>
order deny,allow
deny from all
allow from .math.montana.edu
</Limit>
- I have another directory that I don't want people in this department to read.
In this case, the .htaccess file contains:
AuthType Basic
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "Example Deny From MATH"
<Limit GET>
order allow,deny
allow from all
deny from .math.montana.edu
</Limit>
- User Authentication
- If your users are using a browser that supports user authentication, like Netscape/Mozilla or M$ Internet Explorer, you
can have the users authenticate themselves with a user name and a password before they are able to access protected
documents.
-
For an example, I have created a user.
- I have protected this directory so that only blong can access
it.
In this case, the .htaccess file contains:
AuthType Basic
AuthUserFile /usr/local/apache2/passwd/htpasswd
AuthName "Descriptive name name here"
<LIMIT GET>
Require user blong
</LIMIT>
- I have protected this directory so that only blong can access
it, and only from guass.math.montana.edu.
In this case, the .htaccess file contains:
AuthType Basic
AuthUserFile /usr/local/apache2/passwd/htpasswd
AuthGroupFile /dev/null
AuthName "Example Allow From GAUSS.MATH"
<Limit GET>
order deny,allow
deny from all
allow from gauss.math.montana.edu
Require user blong
</Limit>
Notice the line that begins with "AuthUserFile". In the last example, it pointed to the file
"/usr/local/etc/httpd/passwd/htpasswd". You must point it to your own file. Basically, there are two parts to password
protection:
- Put a file called ".htaccess" in the directory you want to protect. Copy the example above and modify a few lines.
- AuthType Basic (leave this alone)
- AuthUserFile (change to the path of your file, discussed below)
- AuthGroupFile /dev/null (leave this alone)
- AuthName (change to the text that you want to appear at the top of the password dialogue box - note quotes)
- <Limit GET> (leave this alone)
- order deny,allow (leave this alone)
- deny from all(this line and the next go or stay together, omit unless you want to exclude users from certain
machines)
- allow from gauss.math.montana.edu (see directly above)
- Require user (change to a user listed in the AuthUserFile, explained below)
- </LIMIT> (leave this alone)
- AuthUserFile
The AuthUserFile is a text file that you create. It contains usernames and encrypted passwords (one user per line).
E.g.,
blong:feWCE9YuVPnFI
user2:02dfvzXkx4mqg
Just use emacs, pico, etc., to create and edit this file. Then make sure the AuthUserFile line in .htaccess refers to the
right place. It is best not to put the AuthUserFile under your public_html directory. Also, notice the path to the
AuthUserFile is a unix path not a URL.
You can encrypt a password by entering the text in the box (try it and see a more complete example.)
8 character max
Paste the result into your AuthUserFile.
Other Information
Other Sources

-
HTML Information
- JAVA
-
- Graphics (see above)
-
Our local Tutorials:
Basic HTML | Less Basic HTML | More
Advanced HTML | Web Design II A mini-seminar

Last Modified: Tuesday, 14-Jun-2011 16:52:16 MDT