locomotive.org


The Locomotive Embedded Web Server Installation Guide

This is the installation guide for the Embedded Web Server. For now, there's really not much to it:

There is a configuration line in the $LOCO_HOME/config/loco.conf file for creating one or more instances of the Embedded Web Server:

#
# Embedded Web Server(s)
#
# The Locomotive now contains a very simple embedded HTTP server.  You may 
# configure multiple instances, each running with its own configuration.
# This HTTP server is not really meant to be used as a production web
# server (yet anyway.. although you could) but is mainly meant for testing,
# and very simple serving (no stand-alone third-party web server needed,
# hence no locolink tunnel configuration is needed).  By default, the
# Locomotive is configured to start one on port 8081.  
#
# To turn it off (and use either no web server or a separate stand-alone web
# server (with a locolink tunnel), just enter "NONE" for the instance name.
# For example:
#
# WEB_SERVER_INSTANCE_NAMES              NONE
#
# To start more than one instance, each instance needs to have its own config
# file in the config directory named "httpd.conf", where
#  is the name of the web server instance listed in the
# WEB_SERVER_INSTANCE_NAMES line below.  For example:
#
# WEB_SERVER_INSTANCE_NAMES              server1 test2 stage
# 
# would create three instances of the embedded web server and their config
# files would be called "httpdserver1.conf", "httpdtest2.conf", and
# "httpdstage.conf", and they would all be kept in the Locomotive's config/
# directory.
#
# The default is to create one called "test", which loads its configuration
# information from "config/httpdtest.conf".
#
WEB_SERVER_INSTANCE_NAMES                test
Set this configuration line according to the comments above, and then edit your web server's configuration file. If you need to create it, just copy the httpdtest.conf file to your web server's configuration filename.

All of the configuration options in the web server's configuration file are also commented, so it's a good idea to read through those briefly and set the options the way you like them. The defaults should be reasonable, but you may want to modify some. It's a good idea to leave most of them the way they come in the distribution and try running the web server and see what happens. You can always stop it and go back and edit more options.

If your embedded web server doesn't seem to work right, check the EWS logs in your $LOCO_HOME/logs directory (they start with "httpd"). If the EWS is having problems, it will log info about the problems in its main log file.

Also, the EWS logs HTTP requests to an access log (in common-log web server format) in the $LOCO_HOME/logs directory. Because the log format for this file is standard across web servers, you may use any third-party access log analysis tool to produce a web server usage summary.

Troubleshooting

If you can't seem to get it to serve files, then have a look at the web server's log files. The default is to write the logs in the $LOCO_HOME/logs directory.

If when you first try to load a page from your Embedded Web Server, you get an error page like this:


HTTP 404: Not Found




Locomotive 4.2.0

Then edit your $LOCO_HOME/config/httpd<instance-name>.conf file's HTTPD_DOCUMENT_ROOT_PATH to have the path where you installed your Locomotive distribution.

Have fun, and email us any questions or comments you may have! Remember, your feedback is important to us.



$Id: ews_install.html,v 1.6 2000/01/22 17:21:56 jason Exp $
$Revision: 1.6 $