<div dir="ltr">bind_address,{127,0,0,1} should be bind_address,{0,0,0,0}. 127.0.0.1 is the loopback interface and only receives connections from the same host which is why you can't connect from other devices.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 1, 2015 at 1:54 AM, austin aigbe <span dir="ltr"><<a href="mailto:eshikafe@gmail.com" target="_blank">eshikafe@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Still the same experience. I still can't connect.<div>What could be wrong? </div><div><br></div><div>python -m SimpleHTTPServer works well and this implies it's not my network configuration but an application issue. In this case my web_server.erl application. So what am I doing incorrectly?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 1, 2015 at 1:26 AM, Leonard Boyce <span dir="ltr"><<a href="mailto:leonard.boyce@lucidlayer.com" target="_blank">leonard.boyce@lucidlayer.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Removing the bind_address or set it to a non-localhost IP which is bound to your machine should sort it out.</p>
<p dir="ltr">Leonard</p>
<div class="gmail_quote"><div><div>On Feb 28, 2015 6:19 PM, "austin aigbe" <<a href="mailto:eshikafe@gmail.com" target="_blank">eshikafe@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi,<div><br></div><div>I can't seem to access the erlang inets http server (web_server.erl) from my Android phone (using http://<PC IP address>:8000) via WiFi</div><div><br></div><div>However, I am able to access the python based simpleHTTPServer from my Android phone (using http://<PC IP address>:8000) via WiFi.<br><div><br></div><div>How do I make my erlang inets server accessible from an external PC or phone?</div><div><br></div><div>OS: Windows 7</div><div><br></div><div>%-----------------------</div><div>% web_server.erl</div><div>%-------------------------</div><div><div>-module(web_server).</div><div>-export([start/0, stop/0]).</div><div><br></div><div>-define(PORT, 8000).</div><div>-define(SERVER_NAME, "server1").</div><div>-define(ROOT,"C:/Users/eausaig/Desktop/web_server").</div><div><br></div><div>start() -></div><div>{ok, _} = inets:start(httpd, </div><div><span style="white-space:pre-wrap"> </span>[{port, ?PORT},</div><div><span style="white-space:pre-wrap"> </span> {server_name,?SERVER_NAME}, </div><div><span style="white-space:pre-wrap"> </span> {server_root,?ROOT},</div><div><span style="white-space:pre-wrap"> </span> {document_root,?ROOT},</div><div><span style="white-space:pre-wrap"> </span> {bind_address,{127,0,0,1}},</div><div><span style="white-space:pre-wrap"> </span> {directory_index,["index.html"]},</div><div><span style="white-space:pre-wrap"> </span> {server_tokens, full}]).</div><div><br></div><div>stop() -></div><div><span style="white-space:pre-wrap"> </span>[{_,_},{_,P2}] = inets:services(),</div><div><span style="white-space:pre-wrap"> </span>ok = inets:stop(httpd, P2).</div></div><div><br></div></div><div>BR,</div><div>Austin</div></div>
<br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Thomas van Neerijnen<br></div><div>+4477 1709 7670</div></div></div>
</div>