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