4 This is a Wiki, written in Objective CAML by Richard W.M. Jones
7 It is licensed to you under the GNU General Public License (GNU GPL).
8 Please see the file COPYING in this directory for full details.
13 * Apache (probably Apache version 1.3, unless you want to build your
14 own version of Apache 2.0 which doesn't include PCRE).
16 * Objective CAML 3.07 or above.
18 * PCRE library for OCaml.
21 http://ocaml-lib.sourceforge.net/
23 * mod_caml and DBI libraries for OCaml.
24 http://www.merjis.com/developers/mod_caml/
26 * PostgreSQL database 7.3 or above.
28 * Postgres bindings for OCaml.
29 http://www.eleves.ens.fr/home/frisch/soft#postgres
30 (Markus Mottl's later version, renamed PostgreSQL, will probably work, but
31 you may need to modify a little bit of the code in scripts/cocanwiki.ml so
32 it connects to the right database using the right driver).
37 First install all of the above requirements, and check that they're
40 Type 'make all install' (you don't need to be root).
42 Then create a UNICODE database called 'cocanwiki' and load the schema
45 Create a Wiki site by hand in the database:
48 set constraints "hosts_hostname_cn" deferred;
49 insert into hosts (canonical_hostname) values ('test.cocan.org');
50 -- HOSTID is the value of hosts.id, normally 1
51 insert into hostnames (hostid, name) values (HOSTID, 'test.cocan.org');
54 Create an index page by hand in the database:
56 insert into pages (hostid, url, title, description) values (HOSTID, 'index',
57 'Index Page', 'Index Page');
59 Modify your Apache configuration, adding:
61 CamlLoad ...path/to/html/_bin/cocanwiki.cma
63 <VirtualHost test.cocan.org>
64 ServerAdmin you@example.com
65 DocumentRoot ...path/to/html
66 ServerName test.cocan.org
67 Include ....path/to/conf/cocanwiki.conf
70 (Change 'test.cocan.org' to a suitable local server name, and set the
71 paths as appropriate).
73 Set any necessary environment variables and start up the server:
75 export COCANWIKI_TEMPLATES=...path/to/templates
76 # The following is not required if the database is running locally:
77 export PGHOST=hostname.of.database
78 # Replace this with however you would normally start your webserver:
81 Try connecting to the local server using your browser. If it doesn't
82 work, look in the Apache error_log file.
84 More notes on setting environment variables
85 -------------------------------------------
87 You CANNOT use SetEnv to set COCANWIKI_TEMPLATES and/or PGHOST. This
88 is because SetEnv runs too late in the Apache handler cycle for it to
89 be picked up by the scripts.
91 On Debian you must modify /etc/init.d/apache in order to set up
92 environment variables. On the line which reads:
96 remove the -i option from env (Debian bug #252627, marked as WONTFIX).
103 Everything visible under the webserver root.
107 Configuration fragment for Apache.
115 Templates used by the CGI scripts.