kommander / vost

A simple Node.js vHost-Proxy & Load Balancer

Home Page:http://sebastian.formzoo.com/2012/04/03/vost-simple-virtual-hosts-load-balancing-with-node-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NOTICE: This repository is not maintained and was a mere proof of concept back in the days. I am happy if it helps anyone, but do not consider it a working module.

Vost

A simple vHost-Proxy & Load Balancer

License: MIT Author: https://github.com/kommander Repo: https://github.com/kommander/vost

Features

  • Simple Setup
  • Load Balancing
  • Redirects
  • SSL
  • Host Event E-Mail Notifications

Configuration

A configuration file for the service is by default expected at vost/config.js. To find out more about the configuration parameters, have a look at vost/config.example.js.

Proxy Hosts

The hosts configuration expects an Array with host objects. A host reacts on a domain and proxies traffic to one of the specified targets

module.exports = {
  hosts: [
    {
      domain: 'subdomain.yourname.com', // OR: ['subdomain1.yourname.com', 'subdomain2.yourname.com']
      target: 'localhost:8080' // OR: ['target1:8080', 'target2:8080']
    }
  ]
};

Redirect Hosts

A request for a host can be automatically redirected to another domain, by specifying a redirect instead of a target.

module.exports = {
  hosts: [
    {
      domain: 'subdomain.yourname.com', // OR: ['subdomain1.yourname.com', 'subdomain2.yourname.com']
      redirect: 'http://www.somethingelse.com' // Include the protocol in the URL
    }
  ]
};

Run

The service.js is a preset for a simple setup with Vost.

node path/to/vost/service.js

About

A simple Node.js vHost-Proxy & Load Balancer

http://sebastian.formzoo.com/2012/04/03/vost-simple-virtual-hosts-load-balancing-with-node-js/


Languages

Language:JavaScript 100.0%