How to run multiple websites with multiple IP addresses in single server?
Currently I have two websites running on single Amazon EC2 and using Apache web server. Configuring Apache to use virtual host and use a single IP address was simple . But I think Amazon gives you up to 5 IP addresses and would like attach two IP addresses to a single EC2 instance and use those IP addresses for each site.
How do I configure the server that Website A uses one of the IP address f开发者_高级运维or incoming and outgoing data?
Unfortunately, you can only map 1 elastic IP per instance. Its a nasty limitation, because I would love to setup multiple sites using SSL with default port of 443 but I cannot. I usually just use other ports if I have to, but that is not best practice.
The associated elastic IP to the one instance is free. You can set that up in the management console or through the API. Your server should come with its own internal IP address, and the elastic IP gets translated to that.
There are things that you can do with AWS load balancing, which allow you to use multiple ssl sites to one instance.
You can now do this if you run your instance in a VPC.
You can create multiple ENIs (Elastic Network Interfaces) and associate any number of them with a single instance.
The announcement for this feature is at http://aws.typepad.com/aws/2012/07/multiple-ip-addresses-for-ec2-instances-in-a-virtual-private-cloud.html
精彩评论