[erlang-questions] Is Erlyweb working with Yaws 1.8.1? and other framework questions
Carl McDade
carlmcdade@REDACTED
Sat May 23 16:24:31 CEST 2009
Steve,
Thanks for confirming that Erlyweb is the problem. I have actually
tried this with just about every path type and appname but the result
is the same. The / in the path does not matter because something else
in Erlyweb hangs before it gets that far. I guess Yariv is very busy
at work so this probably will not get fixed for a long time. Hopefully
I learn Erlang well enough to fix this myself.
But in the meantime my list of working web oriented software in Erlang
is getting shorter and shorter :(
On to erlang web and yapps then.
thanks again,
On Sat, May 23, 2009 at 4:05 PM, Steve Vinoski <vinoski@REDACTED> wrote:
> On 5/23/09, Carl McDade <carlmcdade@REDACTED> wrote:
>> Actually that is just an excerpt from the error encountered by David
>> while going through the tutorial that is on Yariv's (the erlyweb
>> creator) website. My yaws.conf looks like this:
>>
>> <server localhost>
>> port = 8080
>> listen = 0.0.0.0
>> docroot = "C:\erlang\lib\Yaws-1.81/www"
>> "C:/erlang/lib/Yaws-1.81/applications/music/www"
>> appmods = <cgi-bin, yaws_appmod_cgi> <"/music", erlyweb>
>>
>> <opaque>
>> appname = "music"
>> </opaque>
>> </server>
>>
>> The problems is that in the above appmod music is not found and
>> errors. Surfing to http://localhost:8080/music produces an appmod
>> error.
>
> I took this server conf and replaced erlyweb with an appmod of my own
> that returns a simple JSON string. It worked just fine.
>
>> But if you change the configuration so that the appmod music is the
>> only one and under http://localhost:8080 then the config below works:
>>
>> <server localhost>
>> port = 8080
>> listen = 0.0.0.0
>> docroot = "C:\erlang\lib\Yaws-1.81/www"
>> "C:/erlang/lib/Yaws-1.81/applications/music/www"
>> appmods = <"music", erlyweb>
>>
>> <opaque>
>> appname = "music"
>> </opaque>
>> </server>
>>
>> So there is some conflict with Yaws or a problem with Erlyweb.
>
> I don't think yaws is to blame here. I used dbg tracing to verify that
> the code that parses the conf file is correctly picking up both your
> cgi-bin and music appmods and storing them in its internal conf
> structures. Tracing also shows the code that dispatches to the music
> appmod works exactly as expected with my simple appmod in place of
> erlyweb.
>
> I don't know the internal details of erlyweb, but maybe the fact that
> this second conf file works is due to the opaque appname "music"
> matching the appmod's "music" registration point? Note that in your
> first conf file above the appmod is registered under "/music", not
> "music".
>
> --steve
>
--
Carl McDade
Content Management Systems Consultant
www.hiveminds.co.uk
________________________
More information about the erlang-questions
mailing list