[erlang-questions] inets for web services? (Tom Samplonius)

Ingela Anderton Andin ingela@REDACTED
Thu Apr 26 11:56:10 CEST 2007


>   I need to build a very simple web service (REST), as part of a simple async messaging server.  However, using inets seems to be a bit of challenge.  It is a full blown web server, and the documentation is pretty dense.  Is there better documentation than:
>
> http://www.erlang.org/doc/apps/inets/part_frame.html
>
> ?
>   
You don't like it! You should try the "mishmas" of older releases ;) (I 
am afraid there is no better documentation at the moment.)Well jokes  
aside I know there is still room for  improvement.  Most of the 
information is there but I agree there ought to be a minimal example, 
and there will be some day in the future, it is a question of time.  
Also it  could probably be even more structured,
now at least  there is a structure as opposed to the total chaos of the 
much older inets.
> 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. 
Although just glancing at what should be default I am not sure that it 
will actually work. Alas there is a lot of legacy  stuff in the 
http-server I will make a job description for us to look into that.

>   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.

Regards Ingela -OTP team




More information about the erlang-questions mailing list