There is some decent amount of content on how to install YAWS on Windows. See here, here, and a discussion that I kicked off. In any case, I wanted to ensure that I capture my experience with installing this correctly.
I have copied content from here, and modified it to illustrate what worked for me:
- Install Cygwin
- Install Erlang
- Set the Erlang <Erlang_home>\bin path to the system path. This will ensure that the erl.exe, and erlc.exe are accessible from any directory.
- Download Yaws. Scroll to the bottom of this page, and download the latest build – yaw-x.yy will be the pattern of that file.
- Unpack the downloaded file to a local directory. For instance, c:\opensource\yaws-x.yy. If you unpack the downloaded file under Cygwin, it will create a symbolic link – “yaws” – pointing to yaws-x.yy. Remove this symbolic link.
- Rename the yaws-x.yy directory to yaws
- Start Cygwin, and change directory to the yaws install directory – in our case c:\opensource\yaws-x.yy. Notice that you have to type
cd /cygdrive/c/opensource/yaws-x.yyto change directory.
./configure --prefix= --localstatedir=/var --sysconfdir=/etc
- Edit the configuration file – yaws.conf. This is present in the user’s home directory. In my case, it is present in /home/skiran/yaws.conf. Change all ocurrences of /cygdrive/c to c: (or the unit letter where yaws is installed).
- Remove from yaws.conf the https part unless you have ssl installed on windows. I commented out this section:
# And then an ssl server# <server skiran>
# port = 4443
- Try to run yaws from within Cygwin, using the command:
bin/yaws -ito start an interactive session on cygwin
bin/yaws -Dto start yaws as a daemon
bin/yaws -wto start yaws in werl
- The option that worked for me was to run yaws from within the Windows command prompt. The command structure is
erl -pa <path_to_yaws_ebin_folder> -yaws debug -run yaws --conf <path_to_yaws_config_file> -yaws id defaultIn my case, the path_to_yaws_ebin_folder is c:\opensource\yaws\ebin, and the path_to_yaws_config_file is c:\opensource\cygwin\home\skiran
- I opened a command prompt to the folder that contains the yaws.config file – c:\opensource\cygwin\home\skiran – and typed the command
erl -pa c:\opensource\yaws\ebin -yaws debug -run yaws --conf ./yaws.config -yaws id default
- Yaws should start correctly, with a message “Yaws: Listening to…“
- Open a browser window to the url that it mentions, and you should be all set.