Basic Authentication

Basic Authentication is provided by auth plugin.  In order to protect your virtual hosts you have to do the following steps:

  1. Enable Auth plugin: make sure the auth plugin is enabled in the /etc/monkey/plugins.load configuration file
  2. Create the users list file: # /usr/sbin/mkpasswd -c  -b /etc/monkey/plugins/auth/users.mk  myuser mypassword
  3. Edit your virtual host file and set the authentication rules, e.g: edit /etc/monkey/sites/default and append:
[AUTH]  
    Location /
    Title    "Let's protect our content..."
    Users    /etc/monkey/plugins/auth/users.mk

Now restart Monkey and reload your web page, you will get the authentication box for the specific virtual host. If you add/delete users you will need to restart the service to make the changes take effect, we are working in a smart way to fix this behavior without affect performance or extra I/O.