1. Copy everything to your HTML directory
2. Check wich user is running your PHP scripts.
3. Add a new entry to your /etc/sudoers :
 Example:
  <your web/php user> ALL=(ALL) NOPASSWD: /usr/sbin/vzlist,/usr/sbin/vzctl

4. Create a .htaccess and .htpasswd
5. Edit config.php and try it out :)
