Skip to content

Instantly share code, notes, and snippets.

@deltaepsilon
Created January 27, 2012 19:48
Show Gist options
  • Save deltaepsilon/1690568 to your computer and use it in GitHub Desktop.
Save deltaepsilon/1690568 to your computer and use it in GitHub Desktop.
Node-Http-Proxy Reverse Proxy to Apache
http = require 'http'
httpProxy = require 'http-proxy'
options =
hostnameOnly: true
router:
'dev.getlimed.com': '127.0.0.1:8000'
'dev.cordellesplin.com': '127.0.0.1:8000'
'dev.wordpress.com': '127.0.0.1:8000'
'dev.modern-cupcake.com': '127.0.0.1:8000'
'dev.aws.com': '127.0.0.1:8000'
'dev.opentracker.com': '127.0.0.1:8000'
'dev.christopheresplin.com': '127.0.0.1:8000'
'dev.crm.com': '127.0.0.1:8000'
'dev.chat.com': '127.0.0.1:9000'
'dev.calligraphy.com': '127.0.0.1:9001'
proxyServer = httpProxy.createServer(options)
proxyServer.listen(80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment