Configuring LispWorks UNIX and Windows CL-HTTP

Basic Configuration | Production Configuration | Standalone Configuration | Mobile Configuration | Saving Binary Images

  1. Basic Configuration
  2. 1. System requirements: This version has been tested on Windows, Red Hat Linux and Mac OS X with no known problems. The following versions of LispWorks are supported:
    1. LispWorks 4.4 on UNIX, Windows, Linux or Macintosh: Supports SSL streams and works out of the box.
    2. LispWorks 4.3 on UNIX, Windows, Linux or Macintosh: the latest patch bundle from http://www.lispworks.com/downloads/patch-selection.html plus the parse-integer patch for Windows or Linux which is obtainable by mailing lisp-support@lispworks.com.
    3. LispWorks 4.2 on UNIX, Windows or Linux: the latest patch bundle from http://www.lispworks.com/downloads/patch-selection.html.
    4. LispWorks 4.1 on UNIX, Windows or Linux: the latest patch bundle from http://www.lispworks.com/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@lispworks.com
    5. LispWorks 4.0.1 on Windows: the latest patch bundle from http://www.lispworks.com/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@lispworks.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.
    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 http:examples;examples.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. Mobile Configuration
  8. To avoid the need to restart the server when the computer IP address changes, mobile users can set the variable www-utils:*primary-network-host* to the loopback IP address 127.0.0.1 and use http:add-virtual-host-nick-name to enable access for the current IP address to retrieve URLs whoses host is 127.0.0.1.

  9. Saving binary images
  10. 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@csail.mit.edu