On 06/06/13 at 11:43pm, Anton Cheshkov wrote:
> 1) why we point out the port in "extra-host" section
I don't know why you're doing that.
> 2) what will happen if we'd like to start up another application with
> keter, for example, responding on "curl
127.0.0.1:3006". will it work ?
I think you're still confused about who's listening to what...
The 3005 in your example is not the port your app is listening on. It's
the port nginx is listening on.
The 8000 in your example is also not the port your app is listening on,
It's the port keter is listening on.
Your app actually listens on a random port chosen by keter itself. You
need not know or care what it is. Multiple apps would each listen on
different ports, all assigned by keter.
Keter knows which app gets which request by the Host header and matching
it to the host setting in app.keter. It then routes the requests to the
appropriate port for that app.
If you had two apps managed by keter, you could not hit both without
getting DNS involved.
Say you ran
foo-bar.com and
baz-bat.com on the same box. You would have
to setup a DNS rule to have both of those domains go to the same
physical IP (the box running keter).
Then, foo-bar.keter would specify "
foo-bar.com" as host and
baz-bat.keter would specify "
baz-bat.com" as host.
You would have to curl either "
http://foo-bar.com:3005" or
"
http://baz-bat.com:3005" both would end up hitting (ngnix then) keter
on your server and keter would know which app gets which request by the
Host header (which is either "
foo-bar.com" or "
baz-bat.com").
You could also setup this up locally by adding rules to /etc/hosts
directing both domains 127.0.0.1.
--
patrick brisbin