[erlang-questions] inets httpd problems

József Bérces jozsef.berces@REDACTED
Tue Mar 22 11:14:15 CET 2011


Hi,

Thanks for the answer. Unfortunately, it does not matter if the configuration is coming from the file or not, the default fallback option does not seem to work properly (ESOE Vista). It accepts only IPv6. If the browser sends IPv4 it just does not answer. After running the trace suggested by bmk@REDACTED (inets:enable_trace(max, io, httpd)), it seems that the problem is at lower level as the trace did not produce any printout related to the HTTP queries (it had a lot of other printouts, for example, during the start up of httpd). 

Anyway, for me setting
BindAddress 127.0.0.1|inet
solved the problem as I need local access only. 

But if I wanted httpd to listen at all of the IP addresses of the computer (i.e. no BindAddress) it would not work because in that case it always wants IPv6 and (as the trace showed) the HTTP request does not even come to httpd, it dies at a lower layer. 

BR,
Jozsef

-----Original Message-----
From: ingela.andin@REDACTED [mailto:ingela.andin@REDACTED] On Behalf Of Ingela Andin
Sent: Tuesday, March 22, 2011 17:04
To: Ahmed Omar
Cc: József Bérces; erlang-questions@REDACTED
Subject: Re: [erlang-questions] inets httpd problems

Hi!

If you specify the file or prolist_file option all other options should be in the file.
>From the inets httpd-docs:

"When the web server is started at application start time the properties should be fetched from a configuration file that could consist of a regular erlang property list, e.i. [{Option, Value}] where  Option = property()  and Value = term(), followed by a full stop, or for backwards compatibility an Apache like configuration file. If the web server is started dynamically at runtime you may still specify a file but you could also just specify the complete property list.

{proplist_file, path()}
    If this property is defined inets will expect to find all other properties defined in this file. Note that the file must include all properties listed under mandatory properties.
{file, path()}
    If this property is defined inets will expect to find all other properties defined in this file, that uses Apache like syntax. "

Note that the properties proplist_file and file are mutually exclusive.

Regards Ingela  Erlang OTP team - Ericsson AB


2011/3/21 Ahmed Omar <spawn.think@REDACTED>:
> The quick solution is to add this line to your config BindAddress 
> *|inet
>
> If there's an apache like file provided all other configurations 
> provided in start function are ignored except port and address. I'm 
> not sure if this behavior is documented somewhere
>
> 2011/3/17 József Bérces <jozsef.berces@REDACTED>
>
>> inets:start(httpd,[{file,ConfFile},{ipfamily,inet}]).
>>
>
>
>
> --
> Best Regards,
> - Ahmed Omar
> http://nl.linkedin.com/in/adiaa
> Follow me on twitter
> @spawn_think <http://twitter.com/#!/spawn_think>
>


More information about the erlang-questions mailing list