# Capistrano Deployment to Multiple App Servers w/Mongrel

**URL:** <https://www.ruby-forum.com/t/capistrano-deployment-to-multiple-app-servers-w-mongrel/104690>\
**Category:** Rails\
**Created:** [May 21, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/capistrano-deployment-to-multiple-app-servers-w-mongrel/104690 "2007-05-21T16:27:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Troy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@Dave\_Troy](https://www.ruby-forum.com/u/Dave_Troy)\
**Post date:** [May 21, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/capistrano-deployment-to-multiple-app-servers-w-mongrel/104690/1 "2007-05-21T16:27:17Z")

</div>

Hey folks,

I have an app deployed across multiple app servers with Capistrano as  
follows:

role :web, “[app1.domain.com](http://app1.domain.com)”, :primary =\> true  
role :app, “[app1.domain.com](http://app1.domain.com)”, “[app2.domain.com](http://app2.domain.com)”  
role :db, “[db1.domain.com](http://db1.domain.com)”, :primary =\> true  
…  
set :mongrel\_conf, “#{current\_path}/config/mongrel\_cluster.yml”

This works OK, but I would really like to change the mongrel  
configuration so that it runs on a different address on app1 & app2.

Specifically, I want app1 to listen on 127.0.0.1 and I want app2 to  
listen on 172.16.1.1.

Being able to change the number of mongrels & start port would also be  
handy.

Anyway, I have found plenty of reference to people deploying to  
staging & production environments and changing stuff out that way, but  
this is just to change the config per-server in production.

What is the most elegant way to do this?

Thanks,  
Dave
