I have a domain which points to my IP address, now I want to do the following: if I access the server locally (localhost / 127.0.0.1) I want it to server the pages from default DocumentRoot. If I access the server using the domain name, it servers files from other directory.
I edited httpd.conf adding following lines:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "C:/Xampp/htdocs/mydomain" ServerName mydomain.com </VirtualHost>
unfortunately, it doesn't work as expected - it serves files from "C:/Xampp/htdocs/mydomain" even if I access the server via localhost.
How do I fix it?