#!/bin/bash
echo 'starting yaws with id="default"'
php5-cgi -b 127.0.0.1:9007 &
yaws -D

I'm just learning yaws and erlang myself, but I think that If you want to restart yaws automatically when crashed, you have to add --heart in yaws -D. In this case, you should create a module and call php5-cgi using os:cmd (see erl -man os), and start yaws using runmod in the yaws.config. 

Gustavo


On Tue, Apr 8, 2014 at 10:07 AM, Ian <yaws@poetmail.net> wrote:
Sorry to mess about with this but it's been a learning experience.

1) php5-fpm is not required.

2) Based on Daniel's comment, I bumped my port up to 9007.

3) My YAWSstart.sh has an omission - you need to add the "&" to the
php5-cgi line to release the terminal:

#!/bin/bash
echo 'starting yaws with id="default"'
php5-cgi -b 127.0.0.1:9007 &
yaws -D

4) Re that tweak I mentioned for YAWSstart.sh, Yaws is taking up to a
minute to stop after it's served some pages via fcgi on my system
instead of stopping immediately like it did with plain cgi only. Putting
"killall php5-cgi" first doesn't help speed this up but it does get it
done. This way, if you think yaws is taking too long to stop you can
abort it using ^C and not have to remember to kill the php5-cgi process.

So, almost perfect now, except for Yaws taking so/too long to stop.



------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list