Step One - Install Yaws
sudo apt-get install yaws
well that was easy.
Then you can check the status of the yaws service
To view the default yaws page, navigate to the url: 192.168.2.101:8080 (localhost:8080 if on the same machine - I'm installing on a raspberry pi over ssh, so I'm useing the static IP) as seen in the status, you can also navigate to https://<URL>:8443 and get the same
Step Two - Access Yaws by Domain NameI'm running this on a chromebook and haven't yet found a way to change how chrome resolves hostnames. To get around this, I use dnsmasq on the pi to allow computers on my network to access the local site. I put
Step Three - Eliminate the PortIn order to eliminate the need for the port, I'd like to use apache to proxy and send any traffic destined for yaws.bitzel.net over port 80 (the default http port) to port 8080. I do this by setting up a virtual host in my apache configuration.
I found this article very helpful when configuring virtual hosts on my server. It explains that apache looks for and reads the configuration in conf.d/virtual.conf, as well as explaining how apache treats the sites-available and sites-enabled directories. It is clear enough from their names, but I like to know why programs do certain things. Instead of being explicitly configured in a file, anything in these directories is loaded on startup by apache.
The configurations for each <VirtualHost> is saved in sites-available, and a link is placed in sites-enabled using the a2ensite command (a2dissite will clean up the link).
And the debugging begins...
At first, I had NameVirtualHost * defined in my virtual.conf file. This caused apache to complain about mixing http and https ports. I got around this by adding a second line, and changing the * in the two lines to *:80 and *:443.
I fumbled around for a while trying to reload via: service apache2 and contstantly getting the message:
[FAILED] Reloading web server config: apache2 failed!
One more test showed yaws.bitzel.net displaying the main apache page, but with one last command: