Configuring LispWorks UNIX and Windows CL-HTTP

  1. Basic Configuration
  2. Production Configuration
  3. Standalone Configuration

  1. Basic Configuration
  2. 1. System requirements: This version has been tested on Sparc/SunOS4.1.3, Sparc/Solaris2.6, Alpha/OSF1, Irix6, Windows NT, and Windows 95 and and Windows 98 with no known problems. The following version of LispWorks are supported:
    1. LispWorks 4.2 on UNIX, Windows or Linux: the latest patch bundle.
    2. LispWorks 4.1 on UNIX, Windows or Linux: the latest patch bundle from http://www.xanalys.com/software_tools/downloads/patch-selection.html plus if you have CLIM loaded then you will need the patch atomic-incf-decf-delta which is obtainable by mailing lisp-support@xanalys.com
    3. LispWorks 4.0.1 on Windows: the latest patch bundle from http://www.xanalys.com/software_tools/downloads/patch-selection.html plus if you have CLIM loaded then you will need the patch atomic-incf-decf-delta which is obtainable by mailing lisp-support@xanalys.com
    2. Load Server: To load the server from LispWorks, start LispWorks, load the file http:lw;start.lisp. Use the command (load "lw/start") to compile/load/run CL-HTTP from within the LispWorks programming environment. The script will ask for various options, which can be used to automatically performs steps 3 though 6 below.
    3. Review Configuration Switches: The file Configuration.lisp is loaded at part of the CL-HTTP examples and initializes the parameters which control the operation of the server. The comments describe the significance of the various switches. Consider enabling email so that automatic bug reporting and other programmatic email transmission can work.
    4. LispWorks Specific Configuration Switches: Use http:lw;configuration.lisp or equivalent to initialize parameters required for the LispWorks version under UNIX. The comments describe the reason for these switches.
    5. Export URLs: Use HTTP:EXPORT-URL function to make URL available through the server. At first, load the examples in http:lw;exports.lisp and Exports.lisp. Then, you can adapt or extend these examples to meet your own needs.
    6. Start Server: Evaluate the function HTTP:ENABLE-HTTP-SERVICE to start the server.
    7. Stop Server: Evaluate HTTP:DISABLE-HTTP-SERVICE to stop the server.

  3. Production Configuration
  4. Once you are ready to open up your server to production level loads, you can improve server performance by making the following changes to your version of Configuration.lisp:

    Disable Log Domain Resolution: Set the variable HTTP:*RESOLVE-IP-ADDRESSES-FOR-LOG* to NIL or your machine be be bogged down trying to resolve client domain names. This is done by default.
    Disable Log Notifications: Turn off log notifications on the console with HTTP:LOG-NOTIFICATIONS-ON. This is done by default when starting CL-HTTP from the shell script http:lw;http.script.
    Tune Simultaneous Connections: Adjust the number of simultaneous connections that you allow with HTTP:SET-MAXIMUM-NUMBER-OF-CONNECTIONS.
    Enable Email Interface
    Set the variable smtp:*network-mail-host* to the primary store-and-forward mail host at your site, and provide some alternates on smtp:*store-and-forward-mail-hosts* in case the primary mailer is unavailable. This will enable automatic bug reporting via www-utils:report-bug and allow response functions to send email during www-utils:send-mail-from.

  5. Standalone Configuration
  6. CL-HTTP has been tested in standalone configuration on Windows NT and unix. On Windows, the hosts table needs to be configured with some fake IP address and a fully qualified host name (with dots). The name of the computer should be added as an alias for this address. On unix, the same configuration is needed plus the name of the machine needs to be changed to be fully Specified.

  7. Saving binary images
  8. You can save a binary image containing CL-HTTP in order to reduce the time required to launch the server. These server application images are easiest to manage if they are unconfigured and contain no URL exports. They can be booted and configured in any way without concern to data that might be cached in the image, such as local host information, configuration preferences, or exported URLs. You can further reduce binary image size by using LispWorks Delivery (see the call to save-image in lw/start.lisp for a suitable deliver startup function). To save a binary CL-HTTP image named cl-http.exe, use the following shell or /DOS command (replace lispworks.exe by the appropriate pathname for the LispWorks executable):

    lispworks.exe -init lw/start.lisp -dump-cl-http cl-http.exe [compile|no-compile] [debug-info|no-debug-info] [proxy|no-proxy] [w4|no-w4] [mail-archive|no-mail-archive] [lambda-ir|no-lambda-ir]

    The default set of options is compile proxy.

If you have any questions or suggestions, send mail to www-cl@ai.mit.edu