# Amazon ec2

**URL:** <https://www.ruby-forum.com/t/amazon-ec2/192094>\
**Category:** Mongrel\
**Created:** [July 23, 2010, 6:27pm UTC](https://www.ruby-forum.com/t/amazon-ec2/192094 "2010-07-23T18:27:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carl\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@Carl\_D](https://www.ruby-forum.com/u/Carl_D)\
**Post date:** [July 23, 2010, 6:27pm UTC](https://www.ruby-forum.com/t/amazon-ec2/192094/1 "2010-07-23T18:27:14Z")

</div>

Hi All,

How can I resolve http using a Amazon EC2 instance?

The instance used the mongrel web server for rails.

Do I need to modify a mongrel configuration to use the externally  
assigned  
ip?

Currently resolves to 0.0.0.0:3000 by default.

Thanks

---

<div class="post-metadata">

**Author:** ![Carl\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@Carl\_D](https://www.ruby-forum.com/u/Carl_D)\
**Post date:** [July 24, 2010, 11:00am UTC](https://www.ruby-forum.com/t/amazon-ec2/192094/2 "2010-07-24T11:00:33Z")

</div>

I guess your question is where to bind mongrel and the answer is to the  
local ip since the external ip is not bound to you box by any mean,  
instead,  
the traffic is routed to you instance belong to that public ip(som magic  
happens with the headers).

Here is the definition for public/private ips in ec2

- EC2 Private IP Address: The internal RFC 1918 address of an  
instance  
that is only routable within the EC2 Cloud. Network traffic  
originating  
outside the EC2 network cannot route to this IP, and must use the  
Public IP  
or Elastic IP Address mapped to the instance.

- EC2 Public IP Address: Internet routable IP address assigned by the  
system for all instances. Traffic routed to the Public IP is  
translated via  
1:1 Network Address Translation (NAT) and forwarded to the Private IP  
address of an instance. The mapping of a Public IP to Private IP of  
an  
instance is the default launch configuration for all instance types.  
Public  
IP Addresses are no longer usable upon instance termination.

[http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1346](http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1346)

I hope that helps.

Istvan

On Fri, Jul 23, 2010 at 4:40 PM, Carl D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Currently resolves to 0.0.0.0:3000 by default.
> 
> Thanks
> 
> * * *
> 
> Mongrel-users mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [http://rubyforge.org/mailman/listinfo/mongrel-users](http://rubyforge.org/mailman/listinfo/mongrel-users)

–  
the sun shines for all

[http://l1xl1x.blogspot.com](http://l1xl1x.blogspot.com)
