Amazon AWS EC2 How to assign Elastic IP to a Virtual Server

I have searched around the forum and support issues for an answer, but have not found it.

I have a AMAZON AWS EC2 with an associated Elastic IP.

The EC2 Instance was created with the Virtualmin GPL AMI (though I may upgrade to Pro if it will solve the issue, and I currently have license for VMPro used on a VM). The EC2 Instance is vanilla except for vmbleed repo to allow PHP 5.2.17. Hostname is set to the public hostname for the Elastic IP: not the DHCP (Instance) hostname, not default local.localhost hostname.

I understand that Virtualmin should work with the "default" DHCP assigned address for virtual servers, but I am looking for a way to use the Elastic IP for a Virtual Server. Is this possible?

I created a virtual server and chose Virtual interface and chose the Elastic IP.

"If you want to set up an IP-based virtual host (required for SSL websites or virtual FTP hosting), this option must be set to Virtual interface with IP and an un-used address entered. Virtualmin will activate this IP on your system when the server is created, and associate it with the server."

OK, Virtualmin activated the IP and created eth0:1 for the Elastic IP.

Using registrar's DNS, there is an A record set for the Elastic IP. Intodns.com shows it.

When a browser is pointed to the domain, it brings up the Apache 2 Test Page instead of the virtual server's website.

Status: 
Closed (works as designed)

Comments

The elastic IP doesn't get assigned to the machine's eth0 interface though, so you really don't want to put this in to httpd.conf . Instead, it is an externally visible IP that gets mapped via NAT to the machine's internal interface.

What you really want to do is go to Edit Virtual Server -> Configurable settings and change the "External IP address" to the elastic IP.

Thank you brother, I am figuring it out... different from other VPS options... BTW Virtualmin GPL is awesome... I haven't used it for many years, so was unaware of the current state. Very full featured, I will recommend to other clients.

Still looking to possibly move my VPS & dedicated servers to AWS when the time is right. I like the availability of so many storage and delivery options.

I love deploying servers with Virtualmin. It makes repetitive tasks moot, and difficult tasks easy. The GUI allows me to teach clients how to manage their own servers... VM is the "sleeper" dragster of control panels.

Ok, glad you got it working .. EC2 is a little unusual, due to its separate internal and external IP addresses.