Most instructions on the net seem to assume that you are using the Windows binary of Erlang. I didn't go that route, because dealing with the mix of Windows paths and UNIX paths just bums me out. Everything below is done via a Cygwin bash prompt.

  • wget the Erlang source and tar -zxvf the tarball
  • cd to the source directory
  • ./configure --prefix=/usr
  • make
  • make install
  • Smoke test erl (I just did help(). and q().)
  • mkdir /var/yaws
  • wget the Yaws source and tar -zxvf the tarball
  • cd to the source directory
  • ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
  • make
  • DESTDIR=/. make install
  • "yaws -i" crashes. Oops!
  • Edit /etc/yaws.conf. Comment out localhost and SSL entries; set the remaining http server to use port 8000 instead of80
  • Still crashes. Bummer!

Rollback -- try again after deleting all YAWS and Erlang from Cygwin

  • Download WINDOWS Erlang (R11B), and install to K:\erlang
  • Add K:\erlang\bin to PATH
  • Open a cygwin bash prompt, and
    • smoke test erl (I just issued "q().")
    • tar -zxvf yaws-1.71.tar.gz
    • cd yaw*
    • ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
    • make
    • DESTDIR=/. make install
    • edit /etc/yaws.conf and
      • comment out the SSL server and the localhost server;
      • change the port on the remaining server to 8000;
      • prepend "L:/cygwin" to all paths
      • Remove "/usr" from the first ebin_dir and include_dir
  • "yaws -i" still crashes.
  • Try "make local_install"
  • Edit~/yaws.conf and replace all "/cygdrive/k" with "k:"
  • "bin/yaws -i" still crashes. I give up. I'll install it all under Ubuntu in a VMware virtual machine.
  • Wait! I found a pointer. Trying the following command line from a Windows command prompt appears to start YAWS successfully!
    • erl -pa L:\cygwin\lib\yaws\ebin -yaws debug -run yaws -conf L:\cygwin\etc\yaws.conf -yaws id default
  • Ahhh! Now I see the problem in bin/yaws -- the final line does an eval, and the eval consumes the backslashes. My solution is, near the top, to change the case statement to look like this:

<table border="0"><tbody><tr><td> <pre>case uname in</pre><pre> CYGWIN*)</pre><pre> yawsdir="L:\\cygwin\\lib\\yaws\\"</pre><pre> werl="/cygdrive/k/erlang/bin/werl"</pre><pre> delim=\;;</pre><pre> *)</pre><pre> delim=/</pre><pre>esac </pre><p> </p></td></tr></tbody></table><p>
So my final bash command-line looks like this:</p><p>yaws -i –conf L:\\cygwin\\etc\\yaws.conf </p>