Best way to simulate a domain? Best way to simulate a domain? apache apache

Best way to simulate a domain?


Just create fake domains pointing to your localhost in /etc/hosts file.

For example,

127.0.0.1   localhost domain1.com domain2.com

On Windows, this file is,

WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS


you will need to edit your hosts file like ZZ Coder is saying. But to point the domain to a certain map you will need to edit the httpd.conf files. I add these kind of redirects in my httpd-vhosts.conf

<VirtualHost *:80>    ServerName yourfakedomain.com    DocumentRoot "/var/www/html/"    <Directory /var/www/html/>    Order Allow,Deny        Allow from all    </Directory></VirtualHost>