Migrating NetWare to Linux …

Today I took another step forward in migrating my last NetWare servers to Linux.

While working at Novell I did a considerable amount of R&D on my
own time to set up a complete ISP using Novell’s NetWare. I
experimented with web servers, mail servers, IRC servers, voice/video
conferencing servers and even wrote an MP3 streaming server for
NetWare. By the time that Eric Schmidt joined us at Novell, I had
already created a long list of limitations that were stopping me from
being successful. The irony of the entire situation is that now NetWare
v6.x really has some powerful Internet services … but it’s really too
late. SuSE Linux is going to be the future for Novell.

One of the primary Internet services – of course – is the web server. As a part
of the executive team that partnered with Netscape to create the
Novonyx venture, I quickly embraced the Novonyx SuiteSpot Web Server
on NetWare and have been running it since. To facilitate my move to Linux, I
wanted to first move to Apache on NetWare, and then take the configuration to Linux. Once I have Apache on NetWare working
solid, then changing out the kernel underneath is no big issue.

To get from Netscape Enterprise Server to Apache, the first thing that I did was to take copies of the two core
configuration files – obj.conf for Netscape, and httpd.conf for Apache.
What I found is that there were three core areas that I had to address:

  1. virtual host definitions
  2. log file specs
  3. cgi handling

The first two items in this list were fairly simple to convert. It really
just came down to creating all of the httpd.conf virtual host
definitions. In the obj.conf it might look like this:

<Client urlhost=”www.inevitable.org”>
   NameTrans fn=”document-root” root=”/users/org/Inevitable/Web/Docs”
</Client>

and so in the httpd.conf it now looks like this:

# the.inevitable.org
<VirtualHost 63.230.21.106:80>
    ServerAdmin support@onepostal.com
    DocumentRoot /users/org/Inevitable/Web/Docs
    ServerName the.inevitable.org
    ErrorLog /users/org/Inevitable/Web/Logs/error_log
    CustomLog /users/org/Inevitable/Web/Logs/WebHits.log combined
</VirtualHost>

Note that this also addresses the ‘combined’ log file format and location. In the obj.conf I had to have some lines like:

Init
log0=”/users/org/Inevitable/Web/Logs/WebHits.log”
format.log0=”%Ses->client.ip% – %Req->vars.auth-user% [%SYSDATE%]
“%Req->reqpb.clf-request%” %Req->srvhdrs.clf-status%
%Req->srvhdrs.content-length% “%Req->headers.referer%”
“%Req->headers.user-agent%”” fn=”flex-init”

and:

<Object ppath=”/users/org/Inevitable/Web/Docs/*”>
    AddLog fn=”flex-log” name=”log0″
</Object>

… to write to the logs. Apache is much simpler. It’s just the line within the virtual host above:

CustomLog /users/org/Inevitable/Web/Logs/WebHits.log combined

With all of my .conf file converted, everything seemed to work well. Except cgi …

NetWare was always an interesting animal to deal with when it comes
to server-side development languages. There are a lot of
intersting hoops that have to be jumped through to invoke scripts …
and most of this is done through “NLMs” which are the binary
executables on NetWare. On my servers I had some scripts written
in various languages – including Netbasic and Novell Script – and this
turned out to be the toughest part to define and get working.

The first step was to get ‘mod_lcgi.nlm’ working. I added it to the httpd.conf with the following line:

LoadModule lcgi_module modules/mod_lcgi.nlm

I then had to find the right combination of statements to
get mod_lcgi working properly. The following section I added to
the end of the httpd.conf … and it took me a *long* time to get it
right!

<IfModule mod_lcgi.c>
    AddHandler lcgi-script .nlm .ns .asp .nsp .pl .bas

    ScriptAlias /nsn sys:/nsn/web
    LCGIModuleMap sys:/nsn/lcgi/cgi2ucs.nlm /nsn .ns

    ScriptAlias /sp sys:/nsn/web
    LCGIModuleMap sys:/nsn/lcgi/scrptpgs.nlm .asp .nsp /sp

    ScriptAlias /perl sys:/perl/web
    LCGIModuleMap sys:/perl/lcgi/cgi2perl.nlm .pl /perl
    AddEnvVar PERL_ROOT sys:/perl/web

    ScriptAlias /netbasic sys:/netbasic/web
    LCGIModuleMap sys:/netbasic/lcgi/cgi2nmx.nlm /netbasic .bas
</IfModule>

Once I had that working, I just had to add the mod_lcgi.nlm to the
apachemodules directory … uh and then things went very wrong.

When I restarted the server, mod_lcgi barfed with a whole lot of
“Unresolved Externals” … symbols that could not be resolved and
dynamically linked. It appeared that mod_lcgi.nlm was attempting to
autoload ‘nslcgi.nlm’ and dynamically link.  I had to dig for a
while to determine what
the issue was. I found this Novell TID
that explained my problem! I went and looked at one of my newer
servers where Apache was running fine, and sure enough I found an
updated ‘nslcgi.nlm’ in the
system directory of that server … once I updated this NLM I was
up and going …

I am now running all of my web sites on Apache on NetWare … and so it
is now just one next step to get all of this running on Linux … maybe
next week … 😉

If anyone else is trying to do something like this … feel free to contact me and ask questions!

Leave a Reply