2
%yaourt -Qi ocaml-ocsigenserver
name   : ocaml-ocsigenserver
version  : 2.0.2-1
URL : http://ocsigen.org/

%cat ocsigen.conf.qachina
...
<ocsigen>
<server>
    <port>8000</port>
    <logdir>/media/E/RnD/ocaml/test/log/</logdir>
    <datadir>/media/E/RnD/ocaml/test/data</datadir>

    <user>***</user>
    <group>***</group>

    <charset>utf-8</charset>
    <findlib path="/usr/lib/ocaml"/>

    <extension findlib-package="ocsigenserver.ext.staticmod"/>
    <extension findlib-package="ocsigenserver.ext.cgimod">
        <cgitimeout value="30"/>
    </extension>

    <host charset="utf-8" hostfilter="*">
        <site path="ocsigenstuff">
            <static dir="/srv/ocsigenserver/ocsigenstuff" />
        </site>

        <site path="qachina">
           <cgi regexp="cgi-bin/([^/]*)" dir="/media/E/www/qachina/cgi-bin/" script="\1" />
           <static dir="/media/E/www/qachina" />
       </site>

       <static dir="/srv/ocsigenserver" />
    </host>
</server>
</ocsigen>

%ocsigen -c ocsigen.conf.qachina

When visiting http://127.0.0.1:8000, it works great! However, no matter visiting http://127.0.0.1:8000/ocsigenstuff or http://127.0.0.1:8000/qachina, it reports 404 error!

Any suggestion is appreciated!

z_axis
  • 8,272
  • 7
  • 41
  • 61
  • I would ask that on some `ocsigen` mailing list or forum. Last time (a year ago) when I tried `ocsigen` I noticed that the parsing of the configuration file don't give sensible error messages. – Basile Starynkevitch Jan 02 '12 at 07:50
  • 4
    Did you try running ocsigen with -V option? – Stéphane Glondu Jan 02 '12 at 13:38
  • 2
    The "-V" is very helpful. It tells us that ocsigen need "index.html" not "index.htm". After changing it to index.html, all works great! – z_axis Jan 03 '12 at 06:12

1 Answers1

3

There is nothing wrong with your config file. Ocsigen is looking for "index.html" in the directory, but you provided "index.htm", so it returns a "page not found" error.

As Stéphane pointed out, such a problem can be discovered by running ocsigen using the -V option.

Fabrice Le Fessant
  • 4,222
  • 23
  • 36