I want to do some vhost-jiggery-pokery with node-proxy. Consider that I have a slave script up and running, which listens on a unix-socket: /tmp/node-http/cubixcraft.de
When I want to load it into my node-proxy with the following script it simply doesn’t work. The webpage doesn’t respond.
var fs = require("fs"),
httpProxy = require("http-proxy");
var options = {
hostnameOnly: true,
router: {
"cubixcraft.de": "/tmp/node-http/cubixcraft.de"
}
};
var proxyServer = httpProxy.createServer(options).listen(80);
When I use normal ports instead of socket-paths everything works just fine. I even fired a get request on the socket-path that successfully finished. The path really works. There seems to be something wrong with the node-proxy.
Is anybody experiencing the same problems?
I wanted to do something similar recently, but according to the open github issue here http://github.com/nodejitsu/node-http-proxy/issues/104 it is not possible yet.