
Originally Posted by
Aye
On the same PC?
If I'm not mistaken :
Impossible.
What you said is so wrong, you see this technique used everywhere on the internet.
Solution:
Go to xampp/apache/config/httpd-vhosts.conf and setup your values
Example
Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@.ro
DocumentRoot c:/Path1
ServerName Domain1.com
ServerAlias Domain1.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@.ro
DocumentRoot c:/Path2
ServerName Domain2.com
ServerAlias Domain2.com
</VirtualHost>
This settings will make Domain1.com to correspond with files from c:/Path1 and Domain2.com corresponding to c:/Path2.
(Path1/Path2 is called by default htdocs folder)
Once you have both domains registered just setup your virtual hosts and point them to the same IP address, Apache will do the rest.