# Mongrel: Config File Q

**URL:** <https://www.ruby-forum.com/t/mongrel-config-file-q/59348>\
**Category:** Rails\
**Created:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/mongrel-config-file-q/59348 "2006-05-03T18:57:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/mongrel-config-file-q/59348/1 "2006-05-03T18:57:50Z")

</div>

I’d like to be able to type mongrel\_rails start and have mongrel read a  
conf  
file like lighttpd does. I’m pretty sure this can be done but the  
documentation refers to a camping interface and I just don’t see it.

Can someone point me in the right direction?

## Thx

View this message in context:  
[http://www.nabble.com/Mongrel%3A-Config-File-Q-t1535646.html#a4172243](http://www.nabble.com/Mongrel%3A-Config-File-Q-t1535646.html#a4172243)  
Sent from the RubyOnRails Users forum at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [May 3, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/mongrel-config-file-q/59348/2 "2006-05-03T18:58:02Z")

</div>

1. To use a config file, “mongrel\_rails start -h” gives us the solution  
:

-C, --config PATH Use a config file

1. The camping interface is given with the mongrel\_config plugin.  
To get the plugin :  
“gem install mongrel\_config”

Once the plugin is installed, mongrel\_rails command has another option =  
configtool :  
“mongrel\_rails configtool” launches a web application on  
[http://localhost:3001/camping](http://localhost:3001/camping).

HTH,  
Stéphane.

---

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/mongrel-config-file-q/59348/3 "2006-05-03T18:59:12Z")

</div>

Hi,

Someone mentioned it, but the option you want is -C to give it a config  
file. The config file is currently not well documented (which I’m  
fixing up  
as we speak), but basically it takes each of the long command line  
switches  
as hash items to a YAML file.

If you are serious about doing a configuration based deployment, you are  
probably also serious about managing a cluster of mongrel servers. If  
this  
is the case, then check out the mongrel\_cluster gem from Bradley Taylor  
and  
[railsmachine.net](http://railsmachine.net). It basically handles the config files, starts,  
restarts,  
etc. for a cluster of mongrel processes.

You can get this by doing gem install mongrel\_cluster. There was a post  
recently about it, but I’m going to also have docs on it “real soon  
now”.

There is an additional option for the mongrel hackers out there -S which  
lets you use a “mongrel script”. This is for advanced folks only  
though.  
It basically let’s you use the Configurator to add your own spiffy  
handlers  
and such.

Hope that helps.

Zed A. Shaw

> **[Zed A. shaw](https://zedshaw.com/)**
>
> Personal essays and writings by Zed A. Shaw.

[http://mongrel.rubyforge.org/](http://mongrel.rubyforge.org/)
