Tcl Powered!NeoWebScript

Home
 
Download
User Info
New User FAQ
Tutorials
Demos
Commands
Variables
Troubleshooting
Sysop Info
Sysop FAQ
Theory
Installation
Management
Tests
Troubleshooting
Feedback
Resources
Release Notes
Credits
Disclaimer
NeoWebScript™ Installation

These are instructions for installing NeoWebScript™, an extension of the fabulously popular Apache webserver. This is release 3.0, and is delivered along with Apache 1.3.2.

After you have unpacked this release, execute the install.sh script which resides in this directory. Install.sh (doc the new version)

Install.sh prompts the user for several pieces of information relevant webserver to installing the webserver and creates runtime directories and configuration files from their templates. Install.sh configures assuming that SERVER_ROOT is the httpd directory just below this one.

Note install.sh WILL NOT OVERWRITE previously existing files, so if you repeat the install script, you must remove the files to be changed (probably /usr/local/apache/conf/*.conf).

You may set DOCUMENT_ROOT to another location if you wish.

Below this directory are the following directories, whose purposes are:

/usr/local/apache
        Server root.
/usr/local/apache/etc
        Server configuration directory.
/usr/local/apache/share/htdocs
        Server htdocs directory
/usr/local/apache/share/htdocs/neowebscript
        NeoWebScript documentation, demos, 
        tests, etc.
/usr/local/apache/share/nws-common*
        Aliased directories accessable under all 
        URLs, containing common images & logos
/usr/local/apache/var/log
        A log directory.  Must be writable by the 
        server daemon.  
/usr/local/apache/icons
        Icons, for directories, folders, etc.
./src/webunpack
        Source for the webunpack tool.
/usr/local/apache/bin
        Where the webunpack binary goes.
/usr/local/apache/neowebscript
	Contains the Tcl source which makes it go.
/usr/local/apache/neowebscript/neoscript-data/users
        The tree in which support files
	for user databases will be created.
/usr/local/apache/neowebscript/neoscript-data/system
        Where some system-wide db files exist, for 
        hit counters and various other things.
/usr/local/apache/neowebscript/neoscript-tcl 
        Library of Tcl code which can be autoloaded 
        into the user's safe interpreter while 
        executing NeoWebScript™ Tcl.

/usr/local/apache*
        This is Apache tree, with
	NeoWebScript modules integrated.
To build this release you need the following (copies of which can be found on our web/ftp site):

Tcl 8.0.3 or later, and corresponding versions of TclX and Neo8.0.3, all of which you should be able to find from the same site you found this package (www.neosoft.com/neowebscript).

You probably will also want Gd1.2 (www.boutell.com/gd), and maybe Postgres95 (www.postgresql.org). Basically, get all of the Tcl extensions you want. If you already have Tcl built on your system, then great, the NeoWebScript module will work right in.

You can get a bundled version of all of these based on Tcl8.0 from ftp://ftp.neosoft.com/pub/tcl/neowebscript/neotcl/neotcl8.0.tar.gz.

Step by step instructions:

  1. BUILD YOU PACKAGES

    If you haven't already, build and install Tcl, TclX, Neo, and any other packages you need. We suggest going with shared libraries. Note that Neo contains db.1.85, but if your system comes with it already, and you trust it, then configure it using

    --with-db=system

    so that it will not attempt to build db. One advantage of this is when your native DB lib may be a shared library.

    Note we discourage using --exec-prefix in your configure commands.

  2. BUILD THE NEOWEBSCRIPT SERVER

    Cd to the apache* directory and follow the instructions there for building Apache for your operating system and hardware. The Configuration.tmpl file should be copied to Configuration to start with. This file already contains customizations to put all NeoSoft/NeoWebScript modules into your server. Look through the Configuration file for additional comments on OS-specific changes, especially PREFIX and EXTRA_LIBS, as well as defining your OS.

    Find the line that contains PREFIX and point it to your Tcl install prefix, eg. /usr/local or what you used with the --prefix configure option.

    Mod_neoscript.c contains conditional compiling code to optionally support the several additional Tcl packages. Add or delete -DPackageName to/from CFLAGS as appropiate for your installation to include initialization code for your Tcl packages.

    PackageName/Description

    GDTCL
    The graphical drawing package by Thomas Boutell.
    MIT_OTCL
    An object-oriented Tcl extension written by David Wetherall and the MIT Lab for Computer Science
    POSTGRES95
    The Tcl interface that comes with Postgres95.
    PQATCL
    Another interesting Tcl interface to Postgres which uses channel drivers for connecting to the database.

    If you want to use another package, you will need to modify the C function "init_neoscript" in mod_neoscript.c, to add a call to the init function, and to perform the Tcl_StaticPackage function so that Tcl knows the package is bound into the program.

    We have tended towards linking all packages we think we'll need into the server. This way when it comes time to load a package into a slave, the static package can be referenced instead of a pathname providing faster initialization. However, loading rarely used packages via the Tcl "Load" command is a viable option.

    After you have built httpd, use ldd to make sure the correct shared libraries are being accessed. We have spent many hours chasing segmentation violation errors which turned out to be due to the webserver being restarted with an incorrect LD_LIBRARY_PATH, resulting in execution with incompatable libraries.

    Move the binary into your server root httpd. Note there are two httpd directories; the one under apache* subdirectory is a copy.

  3. CREATE SERVER CONFIGURATIONS

    From the top-level NeoWebScript directory root, run the install.sh shell script.

    Install.sh prompts the user for several pieces of information relevant webserver to installing the webserver and creates runtime directories and configuration files from their templates. Install.sh configures assuming that SERVER_ROOT is the httpd directory just below this one.

    Note install.sh WILL NOT OVERWRITE previously existing files, so if you repeat the install script, you must remove the files to be changed (probably httpd/conf/*.conf).

    You may set DOCUMENT_ROOT to another location if you wish.

  4. BUILD WEBUNPACK (MIME FILE UPLOAD SUPPORT) AND GETPASS

    Build webunpack and getpass. You need webunpack if you are to support MIME uploads. You need getpass if you want to authenticate users from your /etc/passwd file (DES encryption only at this point).

    Go to src/webunpack, make any necessary changes to the Makefile. Edit src/Makefile to define HAVE_SHADOW if you are using shadow password files.

    Again in src, type 'make' then 'make install'. Okay, it's kludgy, and we'll clean this up in the next release, but better a release now! Getpass must be a root set-uid program, so 'make install' should be run as root (especially if you have shadow passwords).

  5. REVIEW/CUSTOMIZE CONFIGURATIONS

    Go to httpd/conf/. Review the configuration files and set things as you prefer. Note that generate-image and server-subst handlers are commented out in srm.conf. If you do not have the GD extentions built to support generate-image, you'll have to comment this out.

    Check srm.conf for Alias settings. /nws-common/ needs to be set to /usr/local/apache/share/nws-common/

    Check httpd.conf, especially for Port and ServerName settings. To experiment, use port 8080 or whatever. If this is your first webserver, go ahead and set Port to 80.

    Check access.conf. Note that server-side includes will not happen unless "Options Includes" applies. We strongly recommend using "Options Includes IncludesNOEXEC", which allows includes, but disallows shell scripts.

    Note that httpd.conf, access.conf and srm.conf all have legacy pathnames for DocumentRoot and ServerRoot.

  6. VERIFY PROPER PATHNAMES FOR EXTERNAL PROGRAMS

    Scan through httpd/conf/*.tcl that make calls to external programs (use absolute paths) such as "du" in devel.tcl, and "sendmail" in init.tcl.


Adding NeoWebScript™ to your existing Apache server

This release should pretty much drop into an existing Apache 1.3.2 tree with relatively minor effort. You will need:

  1. The Tcl packages as described above.
  2. mod_neoscript.c, mod_neo_userdir.c, mod_auth_tcl.c and mod_log_neo.c (and appropriately add these modules to your Configuration file)
  3. A copy of httpd/neoscript-tcl and httpd/conf/*.tcl.
  4. Create:
    neoscript-data/system neoscript-data/users

    Also, you may wish to

  5. Symlink httpd/htdocs/neowebscript under your htdocs. If you do, make sure that srm.conf has the nws-common Alias set as described above.

    And we request that you

  6. Modify your httpd.h file to indicate you are running Apache-NeoWebScript. We would appreciate you doing this, so that your server will show up in the NetCraft surveys as a NeoWebScript instead of just Apache.

Copyright © 1995-1999 NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA. All Rights Reserved