Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top