On my WAMP local Host I am running two different social engine websites, in my hosts file I added two lines:
127.0.0.1 site1.com
127.0.0.1 site2.com
in my apache.conf file I have added this code for virtual hosting
<VirtualHost 127.0.0.1>
ServerAdmin [email protected]
DocumentRoot /wamp/www/se3
ServerName site1.com
ServerAlias site1.com
ErrorLog logs/site1-error_log
CustomLog logs/site1-access_log common
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerAdmin [email protected]
DocumentRoot /wamp/www/site2
ServerName site2.com
ServerAlias site2.com
ErrorLog logs/site2-error_log
CustomLog logs/site2-access_log common
</VirtualHost>
Now the problem which I am facing is, when on browser when I type site1.com
it loads site1 correctly,
but when I type site2.com
it loads site1.
I can't find out the actual problem behind this.
Can any one help me out?
:)