;;; netscape.mhtml: -*- Meta-HTML -*-  DESCRIPTIVE TEXT.
;;;
;;;  Copyright (c) 1996 Brian J. Fox
;;;  Author: Brian J. Fox (bfox@ai.mit.edu) Sun Feb  4 21:45:46 1996.
<set-var
  title="Configuring for the Netscape Server"
  prev-page="plexus.mhtml" prev-title="Configuring Plexus"
  next-page="nsapi.mhtml" next-title="Netscape's NSAPI">
<include header.mhtml>
<set-var mhtml::cacheable=true>

<ptext>

  At the time of this document, Netscape did not provide a way
  to use their browser based admin interface to configure either the
  Commerce or Communications server to execute the <meta-html>
  Engine for every document reference (this is required to handle
  the passing of cookies to and from non-cookie capable browsers).

  In addition, calling technical support at Netscape resulted in the
  answer, "Oh, you can't do that."

  So, here is how you do it:

  <ul>
    <li> Locate the configuration directory for the server in question.
    Let's say that this is
    <b><code>/usr/ns-home/httpd-80.127.0.0.1/config</code></b>

    <li> Locate the actual directory containing your WWW documents.
    Let's say it is <b><code>/usr/www/docs</code></b>

    <li> <b><i>Manually</i></b> edit the <b>obj.conf</b> file you
    found in the config directory, happily ignoring the warning not to
    do so at the top of the file.  Here is what you do:

    <ol>
      <li> Make sure that you have the <i>Object</i> which is named
      <b>cgi</b>.  The entry should look like this:

      <pre>
      &lt;Object name="cgi"&gt;
      ObjectType fn="force-type" type="magnus-internal/cgi"
      Service fn="send-cgi"
      &lt;/Object&gt;
      </pre>

      <li> In the <b>default</b> <i>Object</i>, add the following
      <b>NameTrans</b> line:

      <pre>
NameTrans from="" fn="pfx2dir" method=".*" dir="/usr/www/docs/cgi-bin/nph-engine" name="cgi"
      </pre>

      <li> Save this file.  Remember, you <i>have</i> manually edited
      this file, so it is probably wise to save at least one extra
      copy of it that won't be overwritten by the Netscape admin
      pages.
    </ol>

    <li> Copy the <meta-html> Engine to the file that you
    specified in the <b>NameTrans</b> entry:

    <code> cp engine /usr/www/docs/cgi-bin/nph-engine </code>

    <li> Tell the Engine where the document root directory is.  You do
    this in the usual way, by placing the following into
    <code>/usr/www/docs/cgi-bin/engine.conf</code>:

    <code>&lt;set-var mhtml::document-root = /usr/www/docs&gt;</code>

    <li> Restart your server.
  </ul>
    

Here is a sample <b>obj.conf</b> file from a working site.
</ptext>

<pre>
# This file was automatically generated by the server.
# Edit at your own risk.

&lt;Object name="default"&gt;
NameTrans fn="home-page" path="index.html"
NameTrans from="" fn="pfx2dir" method=".*" dir="/usr/www/docs/cgi-bin/nph-boxtop-engine" name="cgi"
NameTrans from="/mc-icons" fn="pfx2dir" dir="/usr/ns-home/mc-icons"
NameTrans from="/cgi-local" fn="pfx2dir" dir="/usr/www/docs/cgi-bin" name="cgi"
NameTrans from="/cgi-bin" fn="pfx2dir" dir="/www/cgi-bin" name="cgi"
NameTrans fn="unix-home" from="/~" subdir="public_html"
NameTrans root="/www/tvcopsdev/site" fn="document-root"
PathCheck fn="unix-uri-clean"
PathCheck fn="find-pathinfo"
PathCheck index-names="index.html,home.html" fn="find-index"
ObjectType fn="type-by-extension"
ObjectType fn="force-type" type="text/plain"
ObjectType fn="shtml-hacktype"
Service fn="imagemap" method="(GET|HEAD)" type="magnus-internal/imagemap"
Service fn="index-common" method="(GET|HEAD)" type="magnus-internal/directory"
Service fn="send-cgi" type="magnus-internal/cgi"
Service fn="parse-html" method="(GET|HEAD)" type="magnus-internal/parsed-html"
Service fn="send-file" method="(GET|HEAD)" type="*~magnus-internal/*"
&lt;Client ip="*~204.119.208.*"&gt;
AddLog iponly="1" fn="common-log"
&lt;/Client&gt;
&lt;/Object&gt;

&lt;Object name="cgi"&gt;
ObjectType fn="force-type" type="magnus-internal/cgi"
Service fn="send-cgi"
&lt;/Object&gt;
</pre>

<include footer.mhtml>
