<server localhost>
port = 81
listen = 0.0.0.0
docroot = /home/dmitriid/data/www/erlyweb
dir_listings = true
appmods = </, erlyweb>
<opaque>
appname = buktu
</opaque>
</server>
erlyweb:create_app("buktu", "/home/dmitriid/data/www/erlyweb").Then:
> all ok.
erlyweb:compile("/home/dmitriid/data/www/erlyweb/buktu", [{auto_compile, true}]).Then navigate to http://localhost:81/ and:
> all ok.
Internal error, yaws code crashedOnce again I'm lost :)
ERROR erlang code crashed:
File: appmod:0
Reason: {{badrecord,arg},
[{yaws_arg,opaque,1},
{erlyweb,get_app_name,1},
{erlyweb,out,1},
{yaws_server,deliver_dyn_part,8},
{yaws_server,aloop,3},
{yaws_server,acceptor0,2},
{proc_lib,init_p,5}]}
Req: {http_request,'GET',{abs_path,"/"},{1,1}}
--Kevin
Ugh, you must be using a different version of Yaws than the one I compiled against. I compiled against 1.73. You can either recompile ErlyWeb yourself against your Yaws installation or upgrade Yaws.
<server dmitriid>
port = 81
listen = 0.0.0.0
docroot = /home/dmitriid/data/www/erlyweb/buktu/www/
appmods = </, erlyweb>
<opaque>
appname = buktu
</opaque>
</server>
ERROR erlang code crashed:
File: appmod:0
Reason: {no_application_data,"Did you forget to call erlyweb:compile(AppDir)
or add the app's previously compiled .beam files to the Erlang code path?"}
Req: {http_request,'GET',{abs_path,"/"},{1,1}}
> erlyweb:compile("/home/dmitriid/data/www/erlyweb/buktu", [{auto_compile, true}]).
debug:erlyweb_compile:382: Compiling Erlang file "buktu_app_controller"However, if I change the appmod in yaws.conf to
debug:erlyweb_compile:377: Compiling ErlTL file "html_container_view"
debug:erlyweb_compile:382: Compiling Erlang file "html_container_controller"
{ok,{{2007,12,29},{12,33,47}}}
appmods = </buktu, erlyweb>and navigate to http://localhost:81/, I get erlyweb's welcome screen. Now, if I create a, say, view_controller.erl and try to navigate to http://localhost:81/view, I get a 404 Not Found error. If I navigate to http://localhost:81/buktu/view, I get a "no-application_data" error (same as above).