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