diff -ur boa-0.93.17.1/boa.conf boa-0.93.17.2/boa.conf
--- boa-0.93.17.1/boa.conf	Wed Jun 30 13:44:36 1999
+++ boa-0.93.17.2/boa.conf	Sun Jul 18 23:39:16 1999
@@ -21,6 +21,24 @@
 
 Port 80
 
+# Listen: the ineternet address to bind(2) to.  If you leave it out,
+# it takes the behavior before 0.93.17.2, which is to bind to all
+# addresses (INADDR_ANY).  You only get one "Listen" directive,
+# if you want service on multiple IP addresses, you have three choices:
+#    1. Run boa without a "Listen" directive
+#       a. All addresses are treated the same; makes sense if the addresses
+#          are localhost, ppp, and eth0.
+#       b. Use the VirtualHost directive below to point requests to different
+#          files.  Should be good for a very large number of addresses (web
+#          hosting clients).
+#    2. Run one copy of boa per IP address, each has its own configuration
+#       with a "Listen" directive.  No big deal up to a few tens of addresses.
+#       Nice separation between clients.
+# The name you provide gets run through inet_aton(3), so you have to use dotted
+# quad notation.  This configuration is too important to trust some DNS.
+
+#Listen 192.68.0.5
+
 #  User: The name or UID the server should run as.
 # Group: The group name or GID the server should run as.
 
@@ -62,6 +80,10 @@
 # Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A'
 # become /var/www/IP-A.
 # Example: http://localhost/ becomes /var/www/127.0.0.1
+#
+# Not used until version 0.93.17.2.  This "feature" also breaks commonlog
+# output rules, it prepends the interface number to each access_log line.
+# You are expected to fix that problem with a postprocessing script.
 
 #VirtualHost 
 
diff -ur boa-0.93.17.1/src/Changelog boa-0.93.17.2/src/Changelog
--- boa-0.93.17.1/src/Changelog	Sat Jul 10 23:09:04 1999
+++ boa-0.93.17.2/src/Changelog	Sun Jul 18 23:13:55 1999
@@ -1,3 +1,8 @@
+** Changes from 0.93.17.1 to 0.93.17.2
+ * Added "Listen" directive for server bind address, as most recently
+   suggested by David N. Welton <davidw@linuxcare.com>
+ * Put virtualhost feature in, was experimental in 0.92q
+
 ** Changes from 0.93.16.2 to 0.93.17.1
  * New config file parser (supposed to be more maintainable) (LRD)
  * Support for "|command" and ":host:port" syntax for logfiles (untested) (LRD)
diff -ur boa-0.93.17.1/src/alias.c boa-0.93.17.2/src/alias.c
--- boa-0.93.17.1/src/alias.c	Wed Jun 30 13:44:23 1999
+++ boa-0.93.17.2/src/alias.c	Sun Jul 18 23:27:01 1999
@@ -198,6 +198,10 @@
 		sprintf(buffer, "%s/%s", user_homedir, user_dir);
 		if (p)
 		    strcat(buffer, p);
+	} else if (virtualhost && document_root) {
+		sprintf(buffer, "%s/%d.%d.%d.%d%s", document_root,
+			req->iplocal[0], req->iplocal[1],
+			req->iplocal[2], req->iplocal[3], req->request_uri);
 	} else if (document_root) {					/* no aliasing, no userdir... */
 	    sprintf(buffer, "%s%s", document_root, req->request_uri);
 	} else {					/* no document_root?  Can't serve pages */
diff -ur boa-0.93.17.1/src/boa.c boa-0.93.17.2/src/boa.c
--- boa-0.93.17.1/src/boa.c	Wed Jun 30 13:44:23 1999
+++ boa-0.93.17.2/src/boa.c	Sat Jul 17 23:08:26 1999
@@ -26,6 +26,7 @@
 #include "boa.h"
 #include <sys/resource.h>		/* setrlimit */
 #include <grp.h>
+#include <arpa/inet.h>                  /* inet_ntoa */
 
 int server_s;					/* boa socket */
 int backlog = SO_MAXCONN;
@@ -83,6 +84,11 @@
 	/* internet socket */
 	server_sockaddr.sin_family = AF_INET;
 	server_sockaddr.sin_addr.s_addr = htonl(INADDR_ANY);
+	if (server_ip != NULL) {
+		inet_aton(server_ip, &server_sockaddr.sin_addr);
+	} else {
+		server_sockaddr.sin_addr.s_addr = htonl(INADDR_ANY);
+	}
 	server_sockaddr.sin_port = htons(server_port);
 
 	if (bind(server_s, (struct sockaddr *) &server_sockaddr,
diff -ur boa-0.93.17.1/src/config.c boa-0.93.17.2/src/config.c
--- boa-0.93.17.1/src/config.c	Sat Jul 10 22:50:55 1999
+++ boa-0.93.17.2/src/config.c	Sat Jul 17 22:54:07 1999
@@ -46,6 +46,7 @@
 char *server_admin;
 char *server_root;
 char *server_name;
+char *server_ip;
 int virtualhost;
 
 char *document_root;
@@ -88,6 +89,7 @@
 
 struct ccommand clist[] = {
 	{ "Port",             S1A, c_set_int,      &server_port },
+	{ "Listen",           S1A, c_set_string,   &server_ip },
 	{ "BackLog",          S1A, c_set_int,      &backlog },
 	{ "User",             S1A, c_set_user,     NULL },
 	{ "Group",            S1A, c_set_group,    NULL },
diff -ur boa-0.93.17.1/src/globals.h boa-0.93.17.2/src/globals.h
--- boa-0.93.17.1/src/globals.h	Thu Dec 24 00:19:46 1998
+++ boa-0.93.17.2/src/globals.h	Sun Jul 18 23:27:25 1999
@@ -67,6 +67,7 @@
 
 	char *if_modified_since;	/* If-Modified-Since */
 	char remote_ip_addr[20];	/* after inet_ntoa */
+	unsigned char iplocal[4];       /* for virtualhost */
 	int remote_port;			/* could be used for ident */
 
 	time_t last_modified;		/* Last-modified: */
@@ -155,6 +156,7 @@
 extern char *server_admin;
 extern char *server_root;
 extern char *server_name;
+extern char *server_ip;
 
 extern char *document_root;
 extern char *user_dir;
@@ -173,5 +175,6 @@
 extern int verbose_cgi_logs;
 
 extern int backlog;
+extern int virtualhost;
 
 #endif
diff -ur boa-0.93.17.1/src/log.c boa-0.93.17.2/src/log.c
--- boa-0.93.17.1/src/log.c	Sat Jul 10 22:44:40 1999
+++ boa-0.93.17.2/src/log.c	Sun Jul 18 23:20:39 1999
@@ -136,6 +136,9 @@
 void log_access(request * req)
 {
 	if (access_log) {
+		if (virtualhost) fprintf(access_log, "%d.%d.%d.%d ",
+				req->iplocal[0], req->iplocal[1],
+				req->iplocal[2], req->iplocal[3]);
 		fprintf(access_log, "%s - - %s\"%s\" %d %ld\n",
 				req->remote_ip_addr,
 				get_commonlog_time(),
Only in boa-0.93.17.2/src: poll.c
diff -ur boa-0.93.17.1/src/request.c boa-0.93.17.2/src/request.c
--- boa-0.93.17.1/src/request.c	Thu Dec 24 00:20:49 1998
+++ boa-0.93.17.2/src/request.c	Sun Jul 18 23:28:02 1999
@@ -87,7 +87,7 @@
 	/* This shows up due to race conditions in some Linux kernels
 	   when the client closes the socket sometime between
 	   the select() and accept() syscalls.
-	   Code and description by Larry Doolittle <ldoolitt@jlab.org>
+	   Code and description by Larry Doolittle <ldoolitt@boa.org>
 	 */
 #define HEX(x) (((x)>9)?(('a'-10)+(x)):('0'+(x)))
 	if (remote_addr.sin_family != AF_INET) {
@@ -118,6 +118,16 @@
 	conn->status = READ_HEADER;
 	conn->header_line = conn->client_stream;
 	conn->time_last = time(NULL);
+
+	/* fill in iplocal[4] data array if relevant */
+	if (virtualhost) {
+		struct sockaddr_in salocal;
+		int dummy;
+		dummy = sizeof(salocal);
+		if (getsockname(conn->fd, (struct sockaddr *) &salocal, &dummy) == -1)
+			die(SERVER_ERROR);
+		memcpy(&(conn->iplocal), &salocal.sin_addr, 4);
+	}
 
 	/* nonblocking socket */
 	if (fcntl(conn->fd, F_SETFL, NOBLOCK) == -1) {
