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