Track which mongrel handled a request December 26, 2007Posted by John Dewey in Code, Configuration, Example, Mongrel, Rails, WebServers.
add a comment
I wrote a plugin which collects system information, and returns the data as HTML comments at the bottom of the page. When running multi-system / multi-Mongrel environments, knowing which server and Mongrel handled a request is paramount.
Unfortunately, getting a handle on this information is difficult, since ‘request.port’, ‘request.env[‘HTTP_HOST’], and ‘request.env[‘SERVER_PORT’], display the origin port, when your Mongrels are behind a reverse proxy.
Apache mod_rewrite maintenance.html woes December 15, 2007Posted by John Dewey in Apache, Configuration, Rails, WebServers.
add a comment
The recipe contains a mod_rewrite rule, allowing staff to dynamically enable or disable maintenance mode. The mod_rewrite rule, however, does not work on Solaris, OS X or systems with a ‘/system’ directory.
I have notified the Pragmatic Studio folks, and Charles (who wrote the documentation hosted at http://mongrel.rubyforge.org/). Below are further details of the problem, along with a solution. Hopefully the word gets out.
Rails environment file “inheritance” December 15, 2007Posted by John Dewey in Code, Configuration, Example, Rails.
Add the following to your new environment file: