4

The following is a guide, step-by-step, to install a YAWS (Yet Another Web Server) on your Mac OSX machine. It has been tested on 10.6.8 SL and worked flawlessly, although the server needs to be restarted if you start spamming F5.

N3sh
  • 881
  • 8
  • 37

2 Answers2

11

Here are the steps for properly installing and testing a YAWS (Yet Another Web Server) on your Mac OSX machine:

Installation:

  1. Go to http://yaws.hyber.org/download/
  2. Get Latest source - e.g. 'yaws-X.XX.tar.gz'.
  3. Unpack it (for this tutorial let's say /Users/Name/Desktop/yaws/ ).
  4. Open Terminal (it can be found in Applications/Utilities).
  5. Type: 'cd /Users/Name/Desktop/yaws/yaws-X.XX/' (without quotes).
  6. Type: './configure' (without quotes) and wait.
  7. Type: 'make' (without quotes) and wait.
  8. Type: 'sudo make install' (without quotes).
  9. Now you need to type your administrator password, the terminal will not display anything you are typing, so don't worry if it seems it is not working properly, and press Enter.
  10. Now YAWS is installing, after it has finish type 'sudo yaws' (without quotes) to run the webserver (it might ask again for the password).

Testing:

  1. Open your browser.
  2. Go to 0.0.0.0.
  3. You should see the yaws homepage: Congratulations! You have installed YAWS.

To start testing your pages just put them in '/tmp' and the just type in your browser 'localhost/pagename.yaws'.

Check this for more information and tutorials: http://yaws.hyber.org/

N3sh
  • 881
  • 8
  • 37
  • 3
    you are a life saver mate ! very simple :) one thing i might add up is that if someone encounters something like this : =ERROR REPORT==== 10-Oct-2012::11:52:07 === Failed to load setuid_drv (from "/usr/local/lib/yaws/ebin/../priv/") : "dlopen(/usr/local/lib/yaws/ebin/../priv/setuid_drv.so, 2): no suitable image found. Did find:\n\t/usr/local/lib/yaws/ebin/../priv/setuid_drv.so: mach-o, but wrong architecture" =ERROR REPORT==== 10-Oct-2012::11:52:07 === FATAL {'EXIT',normal} , this maybe due that yaws version is early. i got this prob using yaws 1.68, tried it with yaws 1.94 worked excellent:) – cgval Oct 10 '12 at 10:51
  • 2
    really appreciate this question/answer, very helpful! – Justin Soliz Feb 01 '13 at 08:14
  • I get this error: "epam.c:2:10: fatal error: 'pam_appl.h' file not found" when I run the make command – Eugene Jan 22 '20 at 03:32
  • @Eugene it seems that you are missing `pam`. Look here: https://stackoverflow.com/questions/21149481/fails-to-build-yaws-on-mac-os-x-10-9 – N3sh Jan 22 '20 at 04:02
  • @N3sh, thank you for the help! I found these files on my system--here are the full paths: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/security/pam_appl.h /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/security/pam_appl.h – Eugene Jan 23 '20 at 17:16
4

You can use brew: http://brew.sh/

brew install yaws
Jeno Laszlo
  • 2,023
  • 18
  • 36
  • brew install erlang; brew install yaws; Worked beautifully, much simpler than accepted answer. – btk Apr 23 '15 at 19:48
  • Check the year in which that answer was made (by me). – N3sh Aug 24 '17 at 08:53
  • After using that brew command, I get this error message when trying to run yaws: "erts_mmap: Failed to create super carrier of size 512 MB". – Eugene Jan 22 '20 at 03:34