[Mongrel] Can you make Mongrel listen on a specific IP

Roy Nicholson nicholson.roy at gmail.com
Thu Mar 5 14:12:05 EST 2009

John Nestoriak wrote:
> Shared hosting environment where each domain has it's own IP. Some use
> mongrel server to run their rails apps. Mongrels of course listen on
> their own port. But ...
> If client1.com has a mongrel listening on 12001 you can go to
> client2.com:12001 and see client1's site.
> Not a huge issue but it's kinda funky.
> I don't see an ip in mongrel's startup options but perhaps I'm missing a
> way to get the mongrel server to only listen on a specific ip address.
> Or has anyone else run into this and come up with a good solution?
The --address /-a option sounds like what you're looking for.

mongrel_rails start --help
-a, --address ADDR               Address to bind to

usage example: mongrel_rails start --address -p 12001

More information about the Mongrel-users mailing list