Re: Wish Cliopatria didn't insist on being the server

Anne Ogborn <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>

>
> But my life would be simpler at this moment if Cliopatria didn't
> insist on being the server (or, more likely, I'm being dense).
>
> I've got my server settings, setting them in http_server is a happy
> way to do it. But I find myself trying to 'outsmart' doc_server and
> cp_server to get it to use my settings. I can pass options to
> cp_server, but then I have to modify run.pl and install gets
> trickier.

You can set several options using settings, including
http:worker_options, What are you missing? run.pl also merges
commandline arguments. Alternatively, load cliopatria, but do not call
cp_server and just do the steps you need yourself.

Ah, thanks!

Here's my server start code.

start :-
server_port(P),
http_set_session_options([enabled(false)]),
http_server(http_dispatch, [port(P), workers(200), timeout(1),
   keep_alive_timeout(1)]).

start_with_doc_server :-
server_port(P),
http_set_session_options([enabled(false)]),
doc_server(P, [port(P), workers(200), timeout(1),
   keep_alive_timeout(1)]).

everything except turning off sessions I can set through http:worker_options. For those reading this,
the http:worker_options can be set through the http://localhost:3020/admin/settings  panel as "Additional options 
to pass to the HTTP Server"
> I don't want pldoc on in production (while security through obscurity
> is no security, allowing intruders to browse pldocs of your entire
> codebase seems to be making their job just a tad too easy).

I think that is a left over from refactoring ClioPatria.  This should
have been a configuration option, so you can easily drop it.

yup yup - doesn't seem to be a setting. I'll define a high priority prefix handler at that point to
some 404 handler.

> Cliopatria takes over / location. If I rebase it with the prefix
> setting, it rebases the entire world, not just cliopatria. This is
> painful.

You can easily have your own /, because ClioPatria merely installs
a default one at low priority.  Rebasing using prefix is handled
outside ClioPatria and intended first of all to put servers behind
proxies at a different location.  ClioPatria's paths all (hopefully)
use the path alias cliopatria, so you can change that to move all
cliopatria paths.  But, typically rebinding / should be enouh.

ok, changing the cliopatria path alias should work for me.

> Decided I didn't need full Cliopatria for this project, and am going
> to just use the rdf_db lib. But it would have been saner if it just
> played well with others. 8cP

That is a fair choice if you just want RDF.

8cD Well, now I've got SPARQL and persistancy as well.  8cD
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.