Can you make Mongrel listen on a specific IP

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?

John Nestoriak wrote:

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 127.0.0.1 -p 12001