inets httpd - how to handle

Sanjaya Vitharana sanjaya@REDACTED
Thu Nov 10 08:24:34 CET 2005


I'm trying to use inets for the first time as a http deamon & having trouble. Need any help from experts.

what I did:
1.) copy the inets example server_root to the /tmp/vm/web/server_root/
2.) change all paths in httpd.conf to the /tmp/vm/web/server_root/ & edit ErlScriptAlias as
       ErlScriptAlias /vm_db prof_db
3.) create vm_db folder as /tmp/vm/web/server_root/vm_db
4.) as a test I just create prof_upd.erl as follows & compile in the vm_db folder. (get the test function from httpd_example.erl)



test(Env,Input) ->
  %%----------Server Side Out Puts-----------
    InData = httpd:parse_query(Input),
    io:format("GOT THIS: ~p~n",[InData]),
    %%----------Return to client---------------
    %% Returning this
     "<TITLE> A Test Page </TITLE>",
     "<H1> A TEST </H1>",

5.) create inets.config as folows

6.) start erlang using
erl -sname vm -config /tmp/vm/web/server_root/conf/inets

7.) start the inets as application:start(inets).

8.) try to get the reqult using web browser from different mechine i.e 

what I get is:
HTTP Error 403 - Forbidden 
Internet Explorer 
What I am doing wrong? why this happens? how to avoid this? are there any secutrity applies? what's the proper way get a http request to inets from browser & execute erlang code (ex: gen_sever:call) & send the result back? Need help from inets expert

Thanks in advance

Sanjaya Vitharana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list