I have two domains on the same instance.
I've already configured the httpd.conf as follow:
<VirtualHost *:80>
ServerAdmin webmaster@dropcash.com.br
ServerName dropcash.com.br
DocumentRoot "/var/www/html/dropcash.com.br"
ErrorLog "logs/dropcash.com.br-error_log"
CustomLog "logs/dropcash.com.br-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerName descontos.top
ServerAdmin webmaster@descontos.top
DocumentRoot "/var/www/html/descontos.top"
ErrorLog "logs/descontos.top-error_log"
CustomLog "logs/descontos.top-access_log" common
</VirtualHost>
The configuration on Route 53 is:
First domain
NAME -- Type - Value
dropcash.com.br -- A - ip(elastic ip ec2)
dropcash.com.br -- NS - Values
dropcash.com.br -- SOA - VALUES
www.dropcash.com.br -- A - sameip(elastic ip ec2)
Second domain
NAME -- Type - Value
descontos.top -- A - sameip(elastic ip ec2)
descontos.top -- NS - Values
descontos.top -- SOA - VALUES
www.descontos.top -- A - sameip(elastic ip ec2)
When I try to access the descontos.top, it works. However when I put www.descontos.top, it goes to dropcash.com.br
Why is that happening? How can I fix it?
Thanks a lot!