Re: Nethttpd_plex and authenticated realm

Gerd Stolpmann <[email protected]> Mon, 18 Jul 2011 12:36:20 +0200
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <1310985380.10871.88.camel@thinkpad>
Am Montag, den 18.07.2011, 03:01 -0300 schrieb Matías Giovannini:
> Hello,
> 
> 
> is there any way to set up the moral equivalent of an Apache realm for
> use with Nethttpd's file handler? I'd like to protect my basic HTML
> console with a challenge. Currently my configuration has the section:

There is nothing built-in yet. Basic authentication is very simple,
though, and you can add this as new service type. How to do is not quite
obvious, so I've just taken a few minutes to create a new example:

https://godirepo.camlcity.org/svn/lib-ocamlnet2/trunk/code/examples/nethttpd/netplex_auth.ml

See also the netplex_auth.conf file in the same directory how to enable
this.

Of course, it would be better if such things were already available in
Ocamlnet. The core of this is easy, but it also raises a whole lot of
design questions... That's why it is not there.

Gerd


> 
> 
>         uri {
>           path = "/";
>           service {
>             type = "file";
>             docroot = "/.../html";
>             media_types_file = "/etc/mime.types";
>             default_media_type = "text/html";
>             index_files = "index.html";
>             enable_listings = false;
>             enable_gzip = true;
>           };
>         };
> 
> 
> which is what I would like to "hide" under at least basic
> authentication.
> 
> 
> Thank you,
> Matías.
> ------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric 
> Ries, the creator of the Lean Startup Methodology on "Lean Startup 
> Secrets Revealed." This video shows you how to validate your ideas, 
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________ Ocamlnet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel

-- 
------------------------------------------------------------
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany 
[email protected]          http://www.gerd-stolpmann.de
Phone: +49-6151-153855                  Fax: +49-6151-997714
------------------------------------------------------------


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Ocamlnet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel