[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cocanwiki package



On Thu, Aug 19, 2004 at 01:39:08PM +0200, Sven Luther wrote:
> Maybe you could mail them to me, and i add them to svn archive ? 

There seem to be two issues: (1) adding the LoadModule directive to
the correct Apache config file, probably automatically; (2) setting up
a simple mod_caml-enabled site for testing purposes.

(1) should be done automatically.  I investigated mod_perl to see how
it is done over there: It seems we need a 500mod_caml.info file to be
installed under /usr/lib/apache/1.3, containing just:

LoadModule caml_module /usr/lib/apache/1.3/mod_caml.so

and then one would call:

if [ -x /usr/sbin/apache-modconf ]; then
 for i in apache apache-ssl; do
  if [ -e /etc/$i/httpd.conf ]; then
   apache-modconf $i enable mod_caml
  fi
 done
fi

in postinst and:

if [ -x /usr/sbin/apache-modconf ]; then
 for i in apache apache-ssl; do
  if [ -e /etc/$i/httpd.conf ]; then
   apache-modconf $i disable mod_caml quiet
  fi
 done
fi

in prerm.

As for (2), here's some documentation you could add to README.Debian:

----------------------------------------------------------------------
Installation
------------

Make sure that the LoadModule line has been added to your Apache
configuration (installing the Debian package ought to do this
automatically for you).  The LoadModule line should look like this:

LoadModule caml_module /usr/lib/apache/1.3/mod_caml.so

The Debian package comes with some simple example scripts which are
located in /usr/lib/mod_caml/caml-bin.  You can enable these scripts
in order to test that your mod_caml installation is working.  Add the
following section to your Apache configuration file (eg. to
/etc/apache/httpd.conf or /etc/apache/local.conf):

CamlLoad /usr/lib/mod_caml/registry.cmo

Alias /caml-icons/ /usr/lib/mod_caml/caml-icons/
Alias /caml-bin/ /usr/lib/mod_caml/caml-bin/

<Location /caml-bin>
	SetHandler ocaml-bytecode
	CamlHandler Registry.handler
	Options ExecCGI
	Allow from all
</Location>

After stopping and starting Apache you should be able to visit:

http://your.server/caml-bin/hello.cmo

to see a basic message.  Also try:

http://your.server/caml-bin/params.cmo
http://your.server/caml-bin/conditions.cmo

If you get an error, please examine any messages printed in the Apache
error.log file (eg. /var/log/apache/error.log).

It may help to compare the output from these scripts to the source
code for the examples, obtainable from the mod_caml home page at:

http://www.merjis.com/developers/mod_caml/
https://savannah.nongnu.org/projects/modcaml/

For more advanced scripts using, for instance, the DBI database layer,
you may need to load more modules in to the Apache process when it
starts up.  The author currently uses the following list of modules on
his live servers:

CamlLoad /usr/lib/mod_caml/registry.cmo
CamlLoad /usr/lib/ocaml/3.08/extlib/extLib.cma
CamlLoad /usr/lib/ocaml/3.08/postgres/postgres.cma
CamlLoad /usr/lib/ocaml/3.08/dbi/dbi.cma
CamlLoad /usr/lib/ocaml/3.08/dbi/dbi_postgres.cmo
CamlLoad /usr/share/cocanwiki/html/_bin/cocanwiki.cma

(plus at least 10 other proprietary modules).
----------------------------------------------------------------------


Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
"One serious obstacle to the adoption of good programming languages is
the notion that everything has to be sacrificed for speed. In computer
languages as in life, speed kills." -- Mike Vanier



Reply to: