inets
Mattias Nilsson
mattias@REDACTED
Mon Feb 8 09:32:03 CET 1999
Elan wrote:
>
> Hi,
>
> FreeBSD:
>
> 1. Where do I find the sockets library for Erlang?
> Background:
> After having compiled
> a) the Erlang base file under FreeBSD 3.0 and
> b) the libraries.tar.gz file
> I end up with a library that does not appear to contain a sockets library.
> (Or maybe I'm not looking in the right places for it.) If I try to run
> application:start(sockets).
> as described in the inets manual, I get an error saying:
> {error,{"no such file or directory","sockets.app"}}.
Don't use sockets. There is a better solution, namely gen_tcp (alias
ip_comm) which is a newer, more stable and faster tcp driver for the
emulator. Specify 'SocketType ip_comm' in your .conf files.
> 2. Where does the file inets.conf belong?
> Background:
> The inets manual describes a file inets.conf:
> "A minimal application config file (from now on referred to as inets.conf)
> starting two HTTP servers typically looks as follows:
> [{inets,
> [{services,[{httpd,"/var/tmp/server_root/conf/8888.conf"},
> {httpd,"/var/tmp/server_root/conf/8080.conf"}]}]}]."
>
> However, it doesn't state where the inets.conf should be stored. (Or I
> haven't been able to find where these instructions are given.)
I think this is a bit confusing. inets.conf in this case is an
application startup file, while in the rest of the manual, the .conf
file references refeer to the Apache-style httpd config files.
> 3. I continue the example
> a) without having started sockets,
> b) without inets.conf
> c) having however copied the examples/server_root directory to /var/tmp/...
> - as instructed in the manual -
> and - having run application:start(inets). - I try to run start/0, which
> results in an error:
> 6> inets:start().
> ** exited: {undef,{inets,start,[]}} **
>
> 4. I then try running start/1
> 2> inets:start("/var/tmp/server_root/conf/8888.conf").
> ** exited: {undef,{inets,start,["/var/tmp/server_root/conf/8888.conf"]}} **
>
> I'm obviously running into quite a few problems. Can someone suggest
> solutions?
Try this (assuming your 8888.conf is correct):
1> httpd:start("/var/tmp/server_root/conf/8888.conf").
This should fire up a httpd server on port 8888 (assuming you have
specified Port 8888 in the 8888.conf file).
Let me know if you have any luck.
--
Best Regards, Mattias Nilsson
Open Telecom Platform / Open Systems / Ericsson
More information about the erlang-questions
mailing list