INSTALLATION INSTRUCTIONS FOR NEOWEBSCRIPT-2.3 These are instructions for installing NeoWebScript, an extension of the fabulously popular Apache webserver. This is release 2.3, and is delivered along with Apache 1.2.5. Below this directory are the following directories, whose purposes are: ./doc ./doc/rfc rfc1876.txt: MIME upload documentation. ./httpd Server root. ./httpd/conf Server configuration directory. Also contains most of the Tcl source which makes it go. ./httpd/htdocs Server document root. ./httpd/htdocs/gifs A couple of NeoWebScript gifs. ./httpd/htdocs/neowebscript NeoWebScript documentation, demos, tests, etc. ./httpd/logs A logs directory. Must be writable by the server daemon. ./httpd/icons Icons used by the server for directories, folders, etc. ./src/getpass Source for getpass, a C program to extract the shadow password. ./src/webunpack Source for the webunpack tool. ./httpd/bin Where the webunpack binary goes. ./httpd/neoscript-data/users The tree in which support files for user databases will be created. ./httpd/neoscript-data/system Where some system-wide db files exist, for hit counters and various other things. ./httpd/neoscript-tcl Library of Tcl code which can be autoloaded into the user's safe interpreter while executing NeoWebScript Tcl. ./apache_1.2.5 This is Apache 1.2.5 + NeoSoft/NeoWebScript modules, pre-configured to include NeoWebScript and favorable webserver configurations. To build this release you need: Tcl7.5 or later, and corresponding versions of TclX and Neo7.6.0, 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), maybe Postgres (www.postgresql.org), Otcl (you'll need our interpreter-safe version), and/or Itcl. (Itcl is not particularly designed to work with with safe interpreters as it has its own model for restricting access to commands). 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 Tcl7.6 from ftp://ftp.neosoft.com/pub/tcl/neowebscript/webtcl/webtcl7.6.tar.gz. Step by step instructions: 1. BUILD YOUR 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_1.2.5/src directory and follow the INSTALL instructions there for building Apache for your operating system and hardware. That is, copy the Configuration.tmpl to Configuration, then customize the latter in the NeoWebScript section. Find the line that contains PREFIX and point it to your Tcl install prefix, e.g. /usr/local or what you used with the --prefix configure option. Mod_neoscript.c contains conditional compiling code to optionally support additional Tcl packages and extensions. 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 Tcl interesting interface to Postgres which uses channel drivers. 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 binding 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. If you want, however, you can add specific "load" or "package require" commands to httpd/conf/init.tcl in order to bring in additional Tcl packages at runtime. 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. You can set the environment variable within the 'neowebscript' shell script generated by the install.sh script (see the following section), and located in the SERVER_ROOT directory. Move the binary into your server root httpd. 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 directories and files, but instead renaming existing ones by appending a time stamp. 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). In the ./src directory, type 'make' then 'make install'. 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 configured in srm.conf. If you do not have the GD extentions built to support generate-image, you'll have to comment this out. 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. BUILD TCL INDEX Go to httpd/neoscript-tcl/. Invoke the version of Tcl you linked to or built (e.g. /usr/local/bin/neotcl7.6) and run this command: auto_mkindex . *.tcl to build an index for the Tcl autoloader. ----------------------------------------------------------------------------- Adding NeoWebScript to your existing Apache Web Server: This release should pretty much drop into an existing Apache 1.2.5 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 edit your Configuration file to include these modules) 3. A copy of httpd/neoscript-tcl and httpd/conf/*.tcl 4. Create: neoscript-data/system neoscript-data/users under your server root, and chown to the webserver's uid. Also, you may wish to 5. Symlink httpd/htdocs/neowebscript under your htdocs. And we request that you 6. Modify httpd.h to indicate you are running NeoWebScript-2.3. We would appreciate you doing this, so that your server will show up in the NetCraft surveys as a NeoWebScript instead of just Apache.