How to trap USR2 for custom ussage ?
normalperson at yhbt.net
Sat Dec 26 00:53:18 EST 2009
Iñaki Baz Castillo <ibc at aliax.net> wrote:
> El Jueves, 24 de Diciembre de 2009, Eric Wong escribió:
> > > As I've said in other thread I want DRb to get some info related to the
> > > application. A DRb client console could be used to check application
> > > database(s) connection and so.
> > > What would you suggest for this rather than DRb server?
> > As I said before, write an endpoint in your HTTP application that
> > calls and displays all the needed info you need. Something that
> > hits the database(s) and/or whatever else you're using.
> Can Rack/Unicorn behave different depending on the request received port?
> This is: I could run Unicorn in port 80 for clients access and port 5000 for
> admin access (status and so).
> However I couldn't find in Rack specification, neither in Unicorn, a way to
> inspect the port in which the request was received by the http server. Is it
Unicorn should always be running behind nginx if you're dealing with
untrusted clients, so you should just have nginx protecting the admin
endpoints. The SERVER_PORT Rack environment variable is
available, but not considered trustable since it reads the value
of the Host: HTTP header.
More information about the mongrel-unicorn