Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hosting multiple websites on one Amazon EC2 instance

We have created a new EC2 VPC instance on Amazon.

When we created instance at Amazon, it was created with IP address generally know as a Public IP.

For ex: Public IP: xx.xxx.xxx.xx

And we can access our site using above public IP Address (xx.xxx.xxx.xx).

Now we need to create one another site into same instance and access this site by using other Public IP Address.

For ex: Public IP: yy.yyy.yyy.yy

Is it possible to create multiple sites into same instance with different IP addresses? If yes, then how to do that? Let us inform with an appropriate answer.

Thanks in advance.

like image 736
Stan Avatar asked Feb 22 '26 20:02

Stan


1 Answers

Here you have the Amazon article about assigning multiple ip addresses for single ec2 instance but it is only for Amazon VPC http://aws.amazon.com/about-aws/whats-new/2012/07/06/multiple-ip-addresses-for-amazon-ec2-instances-in-amazon-vpc/. If you have an instance in public cloud I suggest you to point domain to your amazon ip address, locate sites in different directories and then create subdomains for each of your sites or assign different domains and play with vhosts file.

If you will have questions please ask

Regards

like image 88
Radoslaw Wasiuk Avatar answered Feb 27 '26 02:02

Radoslaw Wasiuk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!