[erlang-questions] inets for web services? (Tom Samplonius)
Tom Samplonius
tom@REDACTED
Fri Apr 27 02:49:13 CEST 2007
> > The first problem, I found is "Modules" is a required directive
> > (which is not mentioned). And "BindAddress *" is not only not the
> > default, or it does not work on FreeBSD, as I had to explicitly define
> > the IP.
> >
> Modules should have a default value the required attributes of
> httpd.conf should be: server_name, port, server_root, document_root.
Well, if Modules is not specified in the config file, I get this error:
tom@REDACTED:~/erlang$
tom@REDACTED:~/erlang$ erl -config inets
Erlang (BEAM) emulator version 5.5.4 [source] [hipe]
Eshell V5.5.4 (abort with ^G)
1> application:start(inets).
=ERROR REPORT==== 26-Apr-2007::17:25:25 ===
failed to create child spec for
[{file,"/usr/home/tom/erlang/httpd.conf"}]
due to: "httpd_conf: Modules must be specified in the config file"
ok
It seems pretty clear that "Modules" is both mandatory, and must be set.
...
> > Is there any documentation on a minimal inets config for a web
> > service? It looks like I need a minimum, of a inets.config,
> > httpd.conf, and a mime.types file too.
> >
> >
> Yes those should be the files that you need.
> The mime.types is hard coded to be located under $SERVER_ROOT/conf
>
> (god knows why) and is mandatory. We plan to change that.
> There is an example under inets/examples but it is not minimal.
>
> Hope that helps.
Yes, it does. I'm going to look at YAWS now. I've already built it, and it compiled a .c file, so it does not look that promising so far. There seems to be two contradictory uses of "embedded":
1. Running an application in some sort of special purpose device,
2. Running as a component of a larger application.
I'm interested in the later. I was shocked to see that inets httpd is basically an Apache clone, so it is hard to get at the just the httpd bits. I guess an Apache clone is useful if you want to enable a web server on your router.
Tom
More information about the erlang-questions
mailing list