Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 837 Bytes

README.md

File metadata and controls

29 lines (18 loc) · 837 Bytes

Libvirt automatic reverse proxy

This little nodejs app will forward HTTP connections to your local libvirt containers/guests. The route table is constructed by simply concatenating the local guest name to the host name. e.g. host: myserver.local, guests: foo & bar, resulting routing table:

{
  "foo.myserver.local": "foo",
  "bar.myserver.local": "bar"
}

node http reverse proxy for libvirt

node server.js

Options:

  • -h route host (require('os').hostname)
  • -p listen port (80)
  • -c virsh connection string (lxc:///)

usage with forever and libvirt hook system

Example of a /etc/libvirt/hooks/lxc (see libvirt hooks)

#!/bin/bash
sudo -H forever restart <path to this project>