← Previous → Next Contents

Nobska Light, Cape Cod, MA, 1998-06-17

Running the web server

xttpd is an XTide web server.  It provides web-based access to XTide's tide predictions by allowing a web browser to speak directly to the XTide program in HTTP.  xttpd can replace httpd or it can co-exist with one.  Usage:  xttpd [port] [...other xtide settings switches...].

xttpd forks itself into the background and uses the syslog facility for all logging.  Hosts connecting to xttpd are logged with priority INFO.

If you run xttpd with no command line arguments, it will assume that it is replacing httpd and try to bind port 80.  If you want it to co-exist with an existing server, or if you do not have privilege to get port 80, give it the port number as the first command line argument:

% xttpd 8080

You will then need to link it up as http://www.wherever.org:8080/ instead of just http://www.wherever.org/, but otherwise, no damage done.  Similarly, if you wish to bind a specific address, you can specify that as the first argument:

% xttpd 127.0.0.2

If you need to specify both address and port number, separate the two with a slash, like this:

% xttpd 127.0.0.2/8080

Once the port is established, xttpd will try to set its UID and GID to values that were specified at compile time.  If it is unable to do this, it will log failure messages to syslog and then exit.  Consequently, if it is to be started by someone other than root, that user's UID and GID must be configured at compile time.  Instructions for doing this are available at http://www.flaterco.com/xtide/installation.html#xttpd.

You can set the address for feedback either at compile time as described in the installation instructions or with the environment variable XTTPD_FEEDBACK.

xttpd will produce a small number of zombie processes during normal operation.  They are cleaned up after each new connection, so there is no cause for concern.

Since a web site is supposed to be self-explanatory, the process of using xttpd will not be documented here.  If there are problems with people not being able to figure out how to use it, these should be reported to me as bugs, and the explanatory text in the web server will be updated accordingly.

Troubleshooting

Q: When I run xttpd, it exits immediately with no errors to tell me what went wrong.

A: When executed, xttpd immediately disassociates itself from your terminal and starts logging all diagnostics to syslog.  So look in your system logs.  You will find these someplace like /var/log or /var/adm/log.


← Previous → Next Contents