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