From 635245f62766f08dfdbf1aa7a5e0acf0b3bc560a Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 1 Jun 2004 18:44:20 +0000 Subject: [PATCH] * Return to the old command-line usage (-s for https, service is either http or https but not both) --- webcit/ChangeLog | 5 +++++ webcit/README.txt | 19 +++++++++---------- webcit/webserver.c | 17 +++-------------- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 1ae01db18..2dffccba2 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,8 @@ $Log$ +Revision 510.9 2004/06/01 18:44:20 ajc +* Return to the old command-line usage (-s for https, service is either + http or https but not both) + Revision 510.8 2004/06/01 03:32:28 ajc * Add "permanent room" setting to room edit screen * create room -- allow longer strings @@ -1838,3 +1842,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/README.txt b/webcit/README.txt index aa1b553b8..eeb70f5a6 100644 --- a/webcit/README.txt +++ b/webcit/README.txt @@ -67,13 +67,11 @@ something like this: Several command-line options are also available. Here's the usage for the "webserver" program: - webserver [-p http_port] [-s https_port] [-t tracefile] - [-c] [remotehost [remoteport]] + webserver [-p http_port] [-s] [-t tracefile] [-c] [remotehost [remoteport]] *or* - webserver [-p http_port] [-s https_port] [-t tracefile] - [-c] uds /your/citadel/directory + webserver [-p http_port] [-s] [-t tracefile] [-c] uds /your/citadel/directory Explained: @@ -84,11 +82,6 @@ the "webserver" program: are installing WebCit on a dedicated server, then you might choose to use port 80 after all. - -> https_port: an optional TCP port on which you wish your WebCit server - to run an SSL-encrypted web service. The standard port number for this - is 443, and if you're not already running a secure web server you might - choose to use that port. Otherwise, select any free port number. - -> tracefile: where you want WebCit to log to. This can be a file, a virtual console, or /dev/null to suppress logging altogether. @@ -99,6 +92,10 @@ the "webserver" program: load balancer, and the load balancer has the ability to use cookies to keep track of which server to send HTTP requests to. + -> The "-s" option causes WebCit to present an HTTPS (SSL-encrypted) web + service. If you want to do both HTTP and HTTPS, you can simply run two + instances of WebCit on two different ports. + -> remotehost: the name or IP address of the host on which your Citadel/UX server is running. The default is "localhost". @@ -142,7 +139,9 @@ be automatically configured and installed if your host system supports it. WebCit also provides Kolab-compatible free/busy data for calendar clients. Unlike the Kolab server, however, there is no need for each user to "publish" free/busy data -- it is generated on-the-fly from the server-side calendar -of the user being queried. +of the user being queried. Note: in order to support Kolab clients, you must +have WebCit running in HTTPS mode on port 443, because that is what Kolab +clients will be expecting. HTTPS (encryption) SUPPORT diff --git a/webcit/webserver.c b/webcit/webserver.c index 507d0ac84..63d903024 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -246,12 +246,11 @@ int main(int argc, char **argv) pthread_attr_t attr; /* Thread attributes */ int a, i; /* General-purpose variables */ int port = PORT_NUM; /* Port to listen on */ - int https_port = (-1); char tracefile[PATH_MAX]; /* Parse command line */ #ifdef HAVE_OPENSSL - while ((a = getopt(argc, argv, "hp:t:cs:")) != EOF) + while ((a = getopt(argc, argv, "hp:t:cs")) != EOF) #else while ((a = getopt(argc, argv, "hp:t:c")) != EOF) #endif @@ -282,13 +281,13 @@ int main(int argc, char **argv) } break; case 's': - https_port = atoi(optarg); + is_https = 1; break; default: fprintf(stderr, "usage: webserver [-p http_port] " "[-t tracefile] [-c] " #ifdef HAVE_OPENSSL - "[-s https_port] " + "[-s] " #endif "[remotehost [remoteport]]\n"); return 1; @@ -308,16 +307,6 @@ int main(int argc, char **argv) if (chdir(WEBCITDIR) != 0) perror("chdir"); - /* - * If an HTTPS port was specified, fork an HTTPS server. - */ - if (https_port > 0) { - if (fork() == 0) { - is_https = 1; - port = https_port; - } - } - /* * Set up a place to put thread-specific data. * We only need a single pointer per thread - it points to the -- 2.39.2