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