0
votes

I'm trying to host multiple website on Amazon Ec2 linux, but it is only show the first website. I try as following virtual host configuration in httpd.conf.

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/chitthu.co"
ServerName www.chitthu.co
ErrorLog "logs/chitthu.co-error_log"
CustomLog "logs/yourdomain.com-access_log" common

</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/burmanews.co"
ServerName www.burmanews.co
ErrorLog "logs/burmanews.co-error_log"
CustomLog "logs/burmanews.co-access_log" common
</VirtualHost>

And Point both of domain name to same public ip address of EC2 instance. And that is still not working for me.

1
Those two domains load different sites for me. Maybe try clearing your browser cache. - Mark B
@MarkB No, currently, burmanews.co is pointing to different instance. That why loading correct... I'll point it back to same instance again. - Lu Maw
Now, both of the domain names show only "chitthu.co" - Lu Maw
Looks like this is resolved now? Checked both sites point to same IP address - Alec Collier

1 Answers

2
votes

Problem Solved, I allocate new Elastic ip and associate with my EC2 instance, point all domain with that ip is working perfectly.