Forum: Mongrel Can you make Mongrel listen on a specific IP

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0d907b5f0fecf7f6fcf40d0b21005221?d=identicon&s=25 John Nestoriak (psujohn)
on 2009-03-05 18:33
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?
A708e46c6ff240f15c279b40504e24ef?d=identicon&s=25 Roy Nicholson (Guest)
on 2009-03-05 20:18
(Received via mailing list)
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
This topic is locked and can not be replied to.