Re: Adding a yapp not working
Hi Rene,
first of all I hope you have the latest fixes from yaws github repos,
otherwise ebin/yapp.app will not build properly. Otherwise do a update
and run ./configure; make; make install again. You can check that if
yapp/ebin/yapp.app contains real version and modules and not %VSN% and
%MODULES% strings, then it is OK.
You shall keep the original Yaws docroots as they were - no need to
change them as the yapp handler will fix the docroots for it's own
applications. Actually this is the idea, you fix yaws.conf once to get
yapp starting and then it will fix the rest when you add new
applications through the web interface - no need to update yaws.conf
for every new application you wan't to throw in.
I would replace "server myinternalserver" with "server localhost" in
your case, though I do not think this is the problem.
You also need to add a trailing slash to the yapp url:
http://localhost:8001/yapp -> http://localhost:8001/yapp/
in order to see anything; sorry no fancy redirects here
Good luck!
Mikael
2012/3/7 rene <bentobox@...>:
> Hi,
>
> I'm quite new to erlang and yaws. As I like to use yaws in yapp mode I started
> with the example coming with yapp (yapp_ex_1). I configured yaws according to
> the documentaton:
>
> ...
> ebin_dir = /opt/local/lib/yapp/ebin
> ebin_dir = /Users/rene/GitWare/yaws-1.92/applications/yapp/ \
> examples/yapp_ex_1/ebin
> ...
> runmod = yapp
> ...
> <server myexternalserver>
> port = 8000
> listen = 0.0.0.0
> docroot = /Users/rene/GitWare/yaws-1.92/applications/yapp/examples
> /yapp_ex_1/priv/docroot/
> arg_rewrite_mod = yapp
> <opaque>
> yapp_server_id = external
> </opaque>
> </server>
>
> <server myinternalserver>
> port = 8001
> listen = 0.0.0.0
> docroot = /opt/local/lib/yapp/priv/docroot/
> arg_rewrite_mod = yapp
> <opaque>
> yapp_server_id = internal
> bootstrap_yapps = yapp
> </opaque>
> </server>
>
> When I start yaws it successful loads yapp. In the browser I get the yapp page
> with localhost:8001 and not with localhost:8001/yapp. However, when I try to add
> the example application yapp_ex_1 the browser gives me the message that the
> connection was reset and stays with the URL http://localhost:8001/add_post.yaws.
>
> The output from the debugger is the following:
>
> (foo <at> butterfly)1> {'EXIT',
> {noproc,
> {gen_server,call,
> [yapp_handler,
> {yapp_handler,add,{"internal","/yapp_ex_1",yapp_ex_1}}]}}}
> =ERROR REPORT==== 6-Mar-2012::18:24:12 ===
> Yaws process died: {function_clause,
> [{yaws_server,binary_size,
> [848,ok],
> [{file,"yaws_server.erl"},{line,2973}]},
> {yaws_server,binary_size,2,
> [{file,"yaws_server.erl"},{line,2976}]},
> {yaws_server,binary_size,2,
> [{file,"yaws_server.erl"},{line,2976}]},
> {yaws_server,deliver_accumulated,5,
> [{file,"yaws_server.erl"},{line,3567}]},
> {yaws_server,finish_up_dyn_file,2,
> [{file,"yaws_server.erl"},{line,2703}]},
> {yaws_server,aloop,3,
> [{file,"yaws_server.erl"},{line,1167}]},
> {yaws_server,acceptor0,2,
> [{file,"yaws_server.erl"},{line,1025}]},
> {proc_lib,init_p_do_apply,3,
> [{file,"proc_lib.erl"},{line,227}]}]}
>
> What am I doing wrong.
>
> Thank you,
>
> Rene
>
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@...
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/