In my wwwroot folder I have two domain names folder such as

domain1.com AND
domain2.com

When I enter the IP address, domain1.com and domain2.com for the webspace it goes to domain1.com's index.php page

Is there any way I can have more than 1 domain on a single ipaddress and have them both on different web space?

By the way, I am running Apachea so I can use .htaccess.