I highly recommend nginx. Easy to use and is faster at proxying than node. Node and Nginx work together beautifully.
On Mon, Jul 8, 2013 at 7:53 AM, TigerNassau <[email protected]>wrote: > Thks, yeah i realized we need to run node-statc to serve basic pages. > Somehow seems like a lot of node instances to run - one for proxy, one for > restify, and another for static - but seems to work. > > Sent from my LG Mobile > > Floby <[email protected]> wrote: > > >node-http-proxy only proxies to other http servers. It does not serve > >content itself, unless you implement it. > >IIRC you can use http-proxy as a connect middleware. From there you could > >implement a drop-in replacement with a server with 2 middlewares. The > first > >one serving static content. and the second one running http-proxy. > > > >On Sunday, 7 July 2013 19:52:36 UTC+2, John wrote: > >> > >> we have successfully used http-proxy to allow multiple domains on a > >> single server routing incoming to a respective port and node app using > >> proxy-table. > >> ie: > >> 'app1.com' : '127.0.0.1:8080' -> node app running on 8080 > >> 'app2.com' : '127.0.0.1:8081' -> node app running on 8081 > >> > >> > >> How do we use proxy-table to route to a simple index.html files (single > >> page apps) which are not running as node apps on a specific port ? > >> > >> http://app1.com -> /var/local/app1/index.html > >> http://app2.com -> /var/local/app2/index.html > >> > >> and from there the single page app actually uses ajax calls to a restify > >> instance for REST db calls - that part is running okay on a test server. > >> > >> what obvious thing am I missing here ? thks > >> > >> > >> > >> > >> > > > >-- > >-- > >Job Board: http://jobs.nodejs.org/ > >Posting guidelines: > 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 post to this group, send email to [email protected] > >To unsubscribe from this group, send email to > >[email protected] > >For more options, visit this group at > >http://groups.google.com/group/nodejs?hl=en?hl=en > > > >--- > >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]. > >For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > 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 post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: 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 post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- 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]. For more options, visit https://groups.google.com/groups/opt_out.
