The configuration for yaws at first glance was painfull because by default:
1 there is a default file in wich there is a RUN=0 that need to be turned to 1; 2 the default virtual hosts file are all binding to all interfaces (0.0.0.0) on port 8080, creating a new file and assigning an ip to bind to will make yaws fail to start since all ip are already bind; 3 unlike apache yaws is not set uid so for no provileged ports allowed (anyway I use a load balancer in front and is better if the webserver don't run as root)
The content and structure of /etc/yaws
. ./conf.avail ./conf.avail/localhost-ssl.conf ./conf.avail/localhost.conf ./conf.d ./conf.d/localhost.conf ./conf.d/localhost-ssl.conf ./yaws.conf
To have virtual hosting up and running, and to have an instance of yaws running only on localhost(usefull for admin web interafces accessed via tunnels) edit conf.avail/localhost.conf and ./conf.avail/localhost-ssl.conf and change listen = 0.0.0.0 to listen = 127.0.0.1; afterward copy the default localhost.conf file to mywebhost.conf and change the listen = argument to the external ip you want to bind to.