I have a web server running xampp. I have two domain names lets call them http://www.domain1.com and http://www.domain2.com. I have updated the dns settings of domain1 to point to my server which is working fine, (i.e the files for domain1 are in the htdocs folder and when i go to http://www.domain1.com in a browser i get the index file of these files.) What I would like to do though is have two folders in the htdocs folder (one for domain1 and one for domain2). If i change the dns settings of domain1 and domain2 to both point to my servers ip, can i then configure xampp or apache to load the right site depending on what url has been requested?
Thanks
Yes this is easy to do. You simply need to create 1 or 2 virtual hosts in apache. This is done by editing the /apache/conf/extra/httpd-vhosts.conf file in your xampp installation. The file should have the details in it that you need. Apache will need to be restarted for the changes to happen.