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

Re: Cocanwiki package



On Thu, Aug 19, 2004 at 02:12:35PM +0100, Richard Jones wrote:
> 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 a simple description if i remember well.

> 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.

Ok.

> 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):

The example scripts should be in /usr/share/doc/mod-caml, should they not ? 

> 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>

Would it not be easier to add this directly, but maybe not activate it ? One
way of doing this is to add a commented out set of lines, or using a
non-executable script that needs to be setup.

> 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

This would be cool.

> 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/

Ideally, those would be in /usr/share/doc/mod-caml/examples.

> 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

Ok.

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

This sounds really nice.

Friendly,

Sven Luther



Reply to: