|
Division of Information Technology
Web Publishing @ SFSU Customizing your web account |
| Customizing Options | The World Wide web servers at SFSU allow
users to:
|
| Overview | Adding MIME types, access restrictions, and error redirections of each user's files are controlled by
a file named ".nsconfig", located in user's web directory. The ".nsconfig" file consists of sets of directives that control the server, surrounded by "Files" tags: <Files PATTERN1> <Files private/*> |
| Adding MIME Types | ".nsconfig" files allow users to specify what
MIME type should be reported for specific files in their html directory.
This type will then be used by the client when deciding how to process
the document. The directive to use for these purposes is "addtype", which like any other directive in .nsconfig, should appear inside the <Files PATTERN> ... </Files> tags. The syntax is as follows: addtype exp=SHEXP type=mime-type Where "SHEXP"is a wildcard pattern that tells the server which files to associate the "mime-type" with. Examples To add support for MacroMedia ShockWave extensions, the following can be added to the .nsconfig file: <Files *> To add support for Microsoft Word files, the following can be added to the .nsconfig file: <Files *> <Files *> addtype exp=*.mid type=audio/midi </Files> |
| Internet Address Authorization | This method allows you to restrict connections to certain
Internet hosts. Be aware that hostnames are not that hard to spoof - you
should not consider this facility to be very secure. The appropriate directive
to be surrounded by the "Files" tags is RestrictAccess,
and can be used as follows: <Files PATTERN> RestrictAccess type=action ip=ip_pattern dns= host_pattern return-code=code </File> |
|
|
| Changing a Delivered Error Message | The Netscape servers we are using
at SFSU allows users to specify URLs to be displayed in place of default
messages when errors (such as "Not found") occur. This is achieved
by placing an ErrorFile directive in the user's ".nsconfig"
file, which is described in greater detail below.
As all other directives in the ".nsconfig" file, ErrorFile needs to be surrounded by "Files" tags in the following manner: <Files PATTERN> ErrorFile code=error_code path=html_file </Files> "PATTERN" is a wildcard pattern which tells the server which files or directories to apply the directive to. Any specified pattern is automatically prefixed with ~accountname/.
"error_code" is the standard HTTP code
that specifies the error we want to catch. The following are acceptable
error codes and their reasons:
"html_file" should be a valid URL to the
local server but without the
Example
If I wanted to display URL
The order in which multiple RestrictAccess directives appear
is important - the server will use the value from the last directive for
the final result. The default for hosts not specified by a pattern is denial.
For example, if you had the following directives in the ".nsconfig"
file:
<Files PATTERN> <Files PATTERN> Several of the SFSU subscriptions to online services require under the subscription
agreement to restrict access to SFSU authorized persons.
<Files sfsuonly/*>
|
| For More Information | MIME (Multipurpose Internet Mail Extensions) |
Home
Search
Need Help?
1600 Holloway Avenue, San Francisco, CA 94132 (415) 338-1111
Last modified February 26, 2008 by the Web Team