Amazon EC2 - Additional IP address
If you'd like an easy way to get an additional public IPv4 address within an existing EC2 instance follow these steps after logging into the AWS console.
- Select Instances and tick to select the instance you'd like to work with
- Then Actions -> Networking -> Manage Private IP Addresses and select Assign new IP
- Go to Elastic IP addresses -> Allocate New Address
- Tick the new IPv4 address and select Associate Address. From there find your private IP and associate it to that.
SSH into your instance and create /etc/network/interfaces.d/eth0_1.cfg with the following:
auto eth0:1
iface eth0:1 inet static
address <internal_ip_address>
sudo ifup eth0:1
From there you're free to use the new IPv4 address within Apache for instance
Partly via http://serverfault.com/questions/613040/adding-2nd-private-ip-on-aws-ec2-instance