Internal version number is now 7.00
[citadel.git] / webcit / README.txt
1                         WEBCIT for the Citadel System
2                                version 7.00
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         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 2.  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 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 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.
63  
64  To compile from source, enter the usual commands:
65   ./configure --prefix=/usr/local/webcit   [or whatever directory you prefer]
66   make
67   make install
68  
69  Package/Ports Maintainers: to make webcit fit smart into LHFS-ified systems
70  read on at the end of this file, Advanced configure options.
71
72  Then to initialize it:
73   cd /usr/local/webcit
74   ./setup
75  
76  After running setup, you just point your web browser to whatever port you
77 specified, such as:
78  
79   http://your.host.name
80  
81  (or if you specified some other port, such as 8080 in this example...)
82  
83   http://your.host.name:8080
84  
85  ...and log in.
86  
87  The included "setup" program is basically just an installation helper that
88 asks a series of questions and then adds the appropriate line to inittab to
89 start WebCit.  For most installations, this will do just fine.  If you have
90 special circumstances, or if you'd prefer to configure WebCit manually, you
91 may skip the setup program.  Instead, open /etc/inittab and add an entry
92 something like this:
93  
94  wc:2345:respawn:/usr/local/webcit/webserver
95  
96  
97  Several command-line options are also available.  Here's the usage for
98 the "webserver" program:
99   
100  webserver [-i ip_addr] [-p http_port] [-s] [-t tracefile]
101            [-c] [-f] [remotehost [remoteport]]
102  
103    *or*
104  
105  webserver [-i ip_addr] [-p http_port] [-s] [-t tracefile]
106            [-c] [-f] uds /your/citadel/directory
107  
108  Explained: 
109   
110   -> ip_addr: the IP address on which you wish your WebCit server to run.
111      You can leave this out, in which case WebCit will listen on all
112      available network interfaces.  Normally this will be the case, but if
113      you are running multiple Citadel systems on one host, it can be useful.
114      You can also use this option to run Apache and WebCit on different IP
115      addresses instead of different ports, if you have them available.
116  
117   -> http_port: the TCP port on which you wish your WebCit server to run.  If
118      you are installing WebCit on a dedicated server, you can use the
119      standard port 80.  Otherwise, if port 80 is already occupied by some
120      other web service (probably Apache), then you'll need to select a
121      different port.  If you do not specify a port number, WebCit will attempt
122      to use port 80.
123      
124   -> tracefile: where you want WebCit to log to.  This can be a file, a
125      virtual console, or /dev/null to suppress logging altogether.
126  
127   -> The "-c" option causes WebCit to output an extra cookie containing the
128      identity of the WebCit server.  The cookie will look like this:
129        Set-cookie: wcserver=your.host.name
130      This is useful if you have a cluster of WebCit servers sitting behind a
131      load balancer, and the load balancer has the ability to use cookies to
132      keep track of which server to send HTTP requests to.
133  
134   -> The "-s" option causes WebCit to present an HTTPS (SSL-encrypted) web
135      service.  If you want to do both HTTP and HTTPS, you can simply run two
136      instances of WebCit on two different ports.
137
138   -> The "-f" option tells WebCit that it is allowed to follow the
139      "X-Forwarded-For:" HTTP headers which may be added if your WebCit service
140      is sitting behind a front end proxy.  This will allow users in your "Who
141      is online?" list to appear as connecting from their actual host address
142      instead of the address of the proxy.  In addition, the
143      "X-Forwarded-Host:" header from the front end proxy will also be honored,
144      which will help to make automatically generated absolute URL's (for
145      things like GroupDAV and mailing list subscriptions) correct.
146  
147   -> remotehost: the name or IP address of the host on which your Citadel
148      server is running.  The default is "localhost".
149  
150   -> remoteport: the port number on which your Citadel server is running.
151      The default is port 504, the IANA-designated standard port for Citadel.
152  
153   -> "uds" is a keyword which tells WebCit that you wish to connect to a
154      Citadel server running on the same computer, rather than using a TCP/IP
155      socket.  /your/citadel/directory should be set to the actual name of the
156      directory in which you have Citadel installed
157      (such as /usr/local/citadel).  If you run Citadel and WebCit on the same
158      computer, this is recommended, as it will run much faster.
159  
160  
161  GRAPHICS
162  --------
163  
164  WebCit contains graphics, templates, JavaScript code, etc. which are kept
165 in its "static" subdirectory.  All site-specific graphics, however, are
166 fetched from the Citadel server.
167  
168  The "images" directory on a Citadel system contains these graphics.  The
169 ones which you may be interested in are:
170  
171  -> background.gif: a background texture displayed under all web pages
172  -> hello.gif: your system's logo.  It is displayed along with the logon
173     banner, and on the top left corner of each page.
174  
175  If you would like to deploy a "favicon.ico" graphic, please put it in
176 the static/ directory.  WebCit will properly serve it from there.
177  
178  
179  CALENDAR SERVICE
180  ----------------
181  
182  WebCit contains support for calendaring and scheduling.  In order to use it
183 you must have libical v0.26 (or newer) on your system.  You must also be
184 running a Citadel server with calendaring support.  The calendar service will
185 be automatically configured and installed if your host system supports it.
186  
187  WebCit also provides iCalendar format free/busy data for calendar clients.
188 Unlike with some other servers, there is no need for each user to "publish"
189 free/busy data -- it is generated on-the-fly from the server-side calendar
190 of the user being queried.
191   
192  
193  HTTPS (encryption) SUPPORT
194  --------------------------
195  
196  WebCit now supports HTTPS for encrypted connections.  When a secure server
197 port is specified via the "-s" flag, an HTTPS service is enabled.
198  
199  The service will look in the "keys" directory for the following files:
200  
201  citadel.key   (your server's private key)
202  citadel.csr   (a certificate signing request)
203  citadel.cer   (your server's public certificate)
204  
205  If any of these files are not found, WebCit will first attempt to link to the
206 SSL files in the Citadel service's directory (if Citadel is running on the
207 same host as WebCit), and if that does not succeed, it will automatically
208 generate a key and certificate.
209  
210  It is up to you to decide whether to use an automatically generated,
211 self-signed certificate, or purchase a certificate signed by a well known
212 authority.
213
214
215  INTEGRATING INTO APACHE
216  -----------------------
217
218  It is best to run WebCit natively on its own HTTP port.  If, however, you wish
219 to have WebCit run as part of an Apache web server installation (for example,
220 you only have one IP address and you need to stay on port 80 or 443 in order to
221 maintain compatibility with corporate firewall policy), you can do this with
222 the "mod_proxy" Apache module.
223  
224  The preferred way to do this is to configure a NameVirtualHost for your WebCit
225 installation (for example, http://webcit.example.com) and then proxy that
226 virtual host through to WebCit.  The alternative way, which does work but is not
227 quite as robust, is to "mount" the WebCit paths as directory aliases to your
228 main document root.
229
230 Here is how to configure the NameVirtualHost method:
231
232 <VirtualHost mydomain.com:443>
233         #here some of your config stuff like logging, serveradmin...
234         NameVirtualHost www.mydomain.com
235     <location />
236          allow from all
237     </location>
238     ProxyPass / http://127.0.0.1:2000/
239     ProxyPassReverse / http://127.0.0.1:2000/
240 # The following line is optional.  It allows WebCit's static content
241 # such as images to be served directly by Apache.
242     alias /static /var/lib/citadel/www/static
243 </VirtualHost>
244
245 Here is how to configure the "subdirectory" method:
246
247 <VirtualHost mydomain.com:443>
248         #here some of your config stuff like logging, serveradmin...
249         NameVirtualHost www.mydomain.com
250     <location /webcit>
251       allow from all
252     </location>
253     <location /listsub>
254       allow from all
255     </location>
256     <location /groupdav>
257       allow from all
258     </location>
259     <location /who_inner_html>
260       allow from all
261     </location>
262
263     ProxyPass /webcit/ http://127.0.0.1:2000/webcit/
264     ProxyPassReverse /webcit/ http://127.0.0.1:2000/webcit/
265     ProxyPass /listsub/ http://127.0.0.1:2000/listsub/
266     ProxyPassReverse /listsub/ http://127.0.0.1:2000/listsub/
267     ProxyPass /groupdav/ http://127.0.0.1:2000/groupdav/
268     ProxyPassReverse /groupdav/ http://127.0.0.1:2000/groupdav/
269     ProxyPass /who_inner_html http://127.0.0.1:2000/who_inner_html
270     ProxyPassReverse /who_inner_html http://127.0.0.1:2000/who_inner_html
271 # The following line is optional.  It allows WebCit's static content
272 # such as images to be served directly by Apache.
273     alias /static /var/lib/citadel/www/static
274 </VirtualHost>
275
276   
277  ADVANCED CONFIGURE OPTIONS
278  --------------------------
279  
280 If you are building packages and prefer not to have WebCit reside entirely in
281 a single directory, there are several compile-time options available.
282
283 --with-staticdir defines where webcit should locate and search its templates and images. If you
284 want to go with a different installation location then the point at which it is accessed at runtime, 
285 you can use --with-staticrundir. This option is meant to ease your needs if you're going
286 to install the static files as 'examples' in a location like /usr/share/doc/webcit/examples, 
287 and enable the user to copy them over to another dir (like /var/lib/citadel/www), where 
288 they're accessed at runtime. (The debian instatll scripts provided with this package 
289 do this to preserve user changes to the template system, see debian/citadel-webcit.postinstall)
290
291 Also, there are possibilities to load the TinyMCE editor into a system-wide location.  WebCit 
292 uses this standard component to compose its messages for messages and postings. Several WebCit installations
293 that may differ in design but use the same TinyMCE (which is the default that WebCit ships with)
294 (set --with-editordir for that, it defaults to the dir the templates go)
295
296
297  CONCLUSION
298  ----------
299  
300  That's all you need to know to get started.  If you have any questions or
301 comments, please visit UNCENSORED! BBS, the home of Citadel, at
302 http://uncensored.citadel.org - and go to the "Citadel Support" room.
303
304