Im working on an rails project where I need a /http-bind proxy and unable to find anything about this, or find a resource to state this is possible.
I need this forward in a development environment Know its possible to use unicorn + nginx to forward the proxy with unicorn BUT im looking for a simple fast way to do it locally in my development environment…. So, is unicorn, thin, or webrick capable of doing a http-bind proxy forward?
* host.com/http-bind ( xmpp http-bind ) already running
* localhost:3000 THIN server posts to /http-bind returns a 404 not found currently nothing mapped.
Would it be possible to forward the traffic of
http://localhost:3000/http-bind
to
my external http://host.com/http-bind ?
Best Answer
Servers like thin and webrick are great for prototyping, and unicorn and passenger are great application servers, but they are not designed to be full featured web servers. For this sort of thing you really should use an actual web server (e.g. apache or nginx with passenger) as it provides enough flexibility to do these sorts of redirects and other complex configurations you'll need in production.
You can pretty easy throw nginx in front of thin; it would then answer on port 80 and proxy requests to thin on port 3000. A minimal sample config might look like:
You could then add a
location
for bosh something like this: