webcit_before_automake is now the trunk
[citadel.git] / webcit / README.txt
1                         WEBCIT for the Citadel System
2                                version 6.82
3  
4    Copyright (C) 1996-2006 by the authors.  Portions written by:
5         Art Cancro
6         Nathan Bryant
7         Alessandro Fulciniti
8         Wilifried Goesgens
9         Nick Grossman
10         Andru Luvisi
11         Dave Lindquist
12         Martin Mouritzen
13
14    This program is open source software released under the terms of the GNU
15    General Public License, version 2.  Please read COPYING.txt for more
16    licensing information.
17  
18    WebCit bundles the Prototype JavaScript Framework, writen by Sam
19    Stephenson [http://prototype.conio.net].  These components are licensed to
20    you under the terms of an MIT-style license.
21
22    WebCit bundles the script.aculo.us JavaScript library, written by
23    Thomas Fuchs [http://script.aculo.us, http://mir.aculo.us].  These
24    components are licensed to you under the terms of an MIT-style license.
25
26    WebCit bundles the TinyMCE text editor, written by Moxiecode Systems AB
27    (http://tinymce.moxiecode.com/tinymce/docs/credits.html).  This component
28    is licensed to you under the terms of the GNU Lesser General Public
29    License.
30
31    WebCit bundles the Nifty Corners library, written by Alessandro Fulciniti
32    [http://cerca.html.it/cgi-bin/cerca.cgi?q=nifty+corners].  This component
33    is licensed to you under the terms of the GNU General Public License.
34
35
36    The Citadel logo was designed by Lisa Aurigemma.
37
38  
39  INTRODUCTION
40  ------------
41  
42  Citadel is a sophisticated groupware and BBS package which allows multiple
43 users to simultaneously access the system using a variety of user interfaces.
44 This package (WebCit) is a "middleware" package which presents an HTML/HTTP
45 user interface to the Citadel system.
46  
47  What this means in practice is that after you've installed WebCit, users can
48 access all functions of your system using any web browser.  Since this may be
49 the first Citadel experience for many new users, the screens have been designed
50 to be attractive and easy to navigate.
51  
52  
53  INSTALLATION
54  ------------
55  
56  Unline some web-based packages, WebCit contains its own standalone HTTP
57 engine.  As a result, you can get it running quickly without all that tedious
58 mucking about with Apache configuration files and directories.  WebCit is not
59 intended to replace your Apache server, however -- it *only* provides a front
60 end to Citadel.  If you do not have another web server running, you may run
61 WebCit on port 80; however, in the more likely situation that you have Apache
62 or some other web server listening on port 80, you must run WebCit on another
63 port.  The default is port 2000.
64  
65  To compile from source, enter the usual commands:
66   ./configure --prefix=/usr/local/webcit   [or whatever directory you prefer]
67   make
68   make install
69  
70  Package/Ports Maintainers: to make webcit fit smart into LHFS-ified systems
71  read on at the end of this file, Advanced configure options.
72
73  Then to initialize it:
74   cd /usr/local/webcit
75   ./setup
76  
77  After running setup, you just point your web browser to whatever port you
78 specified, such as:
79  
80   http://your.host.name:2000
81  
82  ...and log in.
83  
84  The included "setup" program is basically just an installation helper that
85 asks a series of questions and then adds the appropriate line to inittab to
86 start WebCit.  For most installations, this will do just fine.  If you have
87 special circumstances, or if you'd prefer to configure WebCit manually, you
88 may skip the setup program.  Instead, open /etc/inittab and add an entry
89 something like this:
90  
91  wc:2345:respawn:/usr/local/webcit/webserver
92  
93  
94  Several command-line options are also available.  Here's the usage for
95 the "webserver" program:
96   
97  webserver [-i ip_addr] [-p http_port] [-s] [-t tracefile]
98            [-c] [-f] [remotehost [remoteport]]
99  
100    *or*
101  
102  webserver [-i ip_addr] [-p http_port] [-s] [-t tracefile]
103            [-c] [-f] uds /your/citadel/directory
104  
105  Explained: 
106   
107   -> ip_addr: the IP address on which you wish your WebCit server to run.
108      You can leave this out, in which case WebCit will listen on all
109      available network interfaces.  Normally this will be the case, but if
110      you are running multiple Citadel systems on one host, it can be useful.
111  
112   -> http_port: the TCP port on which you wish your WebCit server to run.  If
113      you are installing WebCit on a dedicated server, you can use the
114      standard port 80.  Otherwise, if port 80 is already occupied by some
115      other web service (probably Apache), then you'll need to select a
116      different port.  If you do not specify a port number, WebCit will attempt
117      to use port 2000.
118      
119   -> tracefile: where you want WebCit to log to.  This can be a file, a
120      virtual console, or /dev/null to suppress logging altogether.
121  
122   -> The "-c" option causes WebCit to output an extra cookie containing the
123      identity of the WebCit server.  The cookie will look like this:
124        Set-cookie: wcserver=your.host.name
125      This is useful if you have a cluster of WebCit servers sitting behind a
126      load balancer, and the load balancer has the ability to use cookies to
127      keep track of which server to send HTTP requests to.
128  
129   -> The "-s" option causes WebCit to present an HTTPS (SSL-encrypted) web
130      service.  If you want to do both HTTP and HTTPS, you can simply run two
131      instances of WebCit on two different ports.
132
133   -> The "-f" option tells WebCit that it is allowed to follow the
134      "X-Forwarded-For:" HTTP headers which may be added if your WebCit service
135      is sitting behind a front end proxy.  This will allow users in your "Who
136      is online?" list to appear as connecting from their actual host address
137      instead of the address of the proxy.  In addition, the
138      "X-Forwarded-Host:" header from the front end proxy will also be honored,
139      which will help to make automatically generated absolute URL's (for
140      things like GroupDAV and mailing list subscriptions) correct.
141  
142   -> remotehost: the name or IP address of the host on which your Citadel
143      server is running.  The default is "localhost".
144  
145   -> remoteport: the port number on which your Citadel server is running.
146      The default is port 504, the IANA-designated standard port for Citadel.
147  
148   -> "uds" is a keyword which tells WebCit that you wish to connect to a
149      Citadel server running on the same computer, rather than using a TCP/IP
150      socket.  /your/citadel/directory should be set to the actual name of the
151      directory in which you have Citadel installed
152      (such as /usr/local/citadel).  If you run Citadel and WebCit on the same
153      computer, this is recommended, as it will run much faster.
154  
155  
156  GRAPHICS
157  --------
158  
159  WebCit contains graphics, templates, JavaScript code, etc. which are kept
160 in its "static" subdirectory.  All site-specific graphics, however, are
161 fetched from the Citadel server.
162  
163  The "images" directory on a Citadel system contains these graphics.  The
164 ones which you may be interested in are:
165  
166  -> background.gif: a background texture displayed under all web pages
167  -> hello.gif: your system's logo.  It is displayed along with the logon
168     banner, and on the top left corner of each page.
169  
170  If you would like to deploy a "favicon.ico" graphic, please put it in
171 the static/ directory.  WebCit will properly serve it from there.
172  
173  
174  CALENDAR SERVICE
175  ----------------
176  
177  WebCit contains support for calendaring and scheduling.  In order to use it
178 you must have libical v0.24 (or newer) on your system.  You must also be
179 running a Citadel server with calendaring support.  The calendar service will
180 be automatically configured and installed if your host system supports it.
181  
182  WebCit also provides iCalendar format free/busy data for calendar clients.
183 Unlike with some other servers, there is no need for each user to "publish"
184 free/busy data -- it is generated on-the-fly from the server-side calendar
185 of the user being queried.
186   
187  
188  HTTPS (encryption) SUPPORT
189  --------------------------
190  
191  WebCit now supports HTTPS for encrypted connections.  When a secure server
192 port is specified via the "-s" flag, an HTTPS service is enabled.
193  
194  The service will look in the "keys" directory for the following files:
195  
196  citadel.key   (your server's private key)
197  citadel.csr   (a certificate signing request)
198  citadel.cer   (your server's public certificate)
199  
200  If any of these files are not found, WebCit will first attempt to link to the
201 SSL files in the Citadel service's directory (if Citadel is running on the
202 same host as WebCit), and if that does not succeed, it will automatically
203 generate a key and certificate.
204  
205  It is up to you to decide whether to use an automatically generated,
206 self-signed certificate, or purchase a certificate signed by a well known
207 authority.
208
209
210  INTEGRATING INTO APACHE
211  -----------------------
212
213  It is best to run WebCit natively on its own HTTP port.  If, however, you wish
214 to have WebCit run as part of an Apache web server installation (for example,
215 you only have one IP address and you need to stay on port 80 or 443 in order to
216 maintain compatibility with corporate firewall policy), you can do this with
217 the "mod_proxy" Apache module.
218  
219  The preferred way to do this is to configure a NameVirtualHost for your WebCit
220 installation (for example, http://webcit.example.com) and then proxy that
221 virtual host through to WebCit.  The alternative way, which does work but is not
222 quite as robust, is to "mount" the WebCit paths as directory aliases to your
223 main document root.
224
225 Here is how to configure the NameVirtualHost method:
226
227 <VirtualHost mydomain.com:443>
228         #here some of your config stuff like logging, serveradmin...
229         NameVirtualHost www.mydomain.com
230     <location />
231          allow from all
232     </location>
233     ProxyPass / http://127.0.0.1:2000/
234     ProxyPassReverse / http://127.0.0.1:2000/
235 # The following line is optional.  It allows WebCit's static content
236 # such as images to be served directly by Apache.
237     alias /static /var/lib/citadel/www/static
238 </VirtualHost>
239
240 Here is how to configure the "subdirectory" method:
241
242 <VirtualHost mydomain.com:443>
243         #here some of your config stuff like logging, serveradmin...
244         NameVirtualHost www.mydomain.com
245     <location /webcit>
246       allow from all
247     </location>
248     <location /listsub>
249       allow from all
250     </location>
251     <location /groupdav>
252       allow from all
253     </location>
254     <location /who_inner_html>
255       allow from all
256     </location>
257
258     ProxyPass /webcit/ http://127.0.0.1:2000/webcit/
259     ProxyPassReverse /webcit/ http://127.0.0.1:2000/webcit/
260     ProxyPass /listsub/ http://127.0.0.1:2000/listsub/
261     ProxyPassReverse /listsub/ http://127.0.0.1:2000/listsub/
262     ProxyPass /groupdav/ http://127.0.0.1:2000/groupdav/
263     ProxyPassReverse /groupdav/ http://127.0.0.1:2000/groupdav/
264     ProxyPass /who_inner_html http://127.0.0.1:2000/who_inner_html
265     ProxyPassReverse /who_inner_html http://127.0.0.1:2000/who_inner_html
266 # The following line is optional.  It allows WebCit's static content
267 # such as images to be served directly by Apache.
268     alias /static /var/lib/citadel/www/static
269 </VirtualHost>
270
271   
272  ADVANCED CONFIGURE OPTIONS
273  --------------------------
274  
275 If you are building packages and prefer not to have WebCit reside entirely in
276 a single directory, there are several compile-time options available.
277
278 --with-staticdir defines where webcit should locate and search its templates and images. If you
279 want to go with a different installation location then the point at which it is accessed at runtime, 
280 you can use --with-staticrundir. This option is meant to ease your needs if you're going
281 to install the static files as 'examples' in a location like /usr/share/doc/webcit/examples, 
282 and enable the user to copy them over to another dir (like /var/lib/citadel/www), where 
283 they're accessed at runtime. (The debian instatll scripts provided with this package 
284 do this to preserve user changes to the template system, see debian/citadel-webcit.postinstall)
285
286 Also, there are possibilities to load the TinyMCE editor into a system-wide location.  WebCit 
287 uses this standard component to compose its messages for messages and postings. Several WebCit installations
288 that may differ in design but use the same TinyMCE (which is the default that WebCit ships with)
289 (set --with-editordir for that, it defaults to the dir the templates go)
290
291
292  CONCLUSION
293  ----------
294  
295  That's all you need to know to get started.  If you have any questions or
296 comments, please visit UNCENSORED! BBS, the home of Citadel, at
297 uncensored.citadel.org.
298
299