Hi everyone,

I'm new on nodejs and start trying to setup multiple domains on my litle 
server, (the http is all setup and working), but when i try http-proxy 
solution they return:

root@NodeCass:/dados# nodejs server.js

/dados/node_modules/http-proxy/lib/http-proxy/index.js:119
    throw err;
          ^
Error: Must provide a proper URL as target
    at ProxyServer.<anonymous> 
(/dados/node_modules/http-proxy/lib/http-proxy/index.js:68:35)
    at Server.closure 
(/dados/node_modules/http-proxy/lib/http-proxy/index.js:125:43)
    at Server.EventEmitter.emit (events.js:98:17)
    at HTTPParser.parser.onIncoming (http.js:2108:12)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] 
(http.js:121:23)
    at Socket.socket.ondata (http.js:1966:22)
    at TCP.onread (net.js:525:27)


The error message only appears on console when i try to access the http on 
listened port, my last try was:

var http = require('http')
, httpProxy = require('http-proxy');

httpProxy.createServer({
  hostnameOnly: true,
  router: {
    'ogenial.com.br': '104.236.197.167:3001'
  }
}).listen(80);


i've change my host file to this domain access this server, and works fine 
when i try to access it directly, like: http://ogenial.com.br:3001 but 
http-proxy keep saying its not a proper URL.

Thank in advance.

Att,
Lucas Schirm

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/a27c1ba7-9867-4446-b964-c94f491832d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to