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