I am new with Apache and I want to try this:
On a server (IP xx.xx.xx.xx) I would like to host multiple websites (www.website1.xxx, www.website2.yyy, www2.website3.z zz).
I have assigned www.website1.xxx and www2.website3.z zz the IP xx.xx.xx.xx.
In the www folder of the server I have Folder1 (for website1) and Folder2 (for website3).
Now, the problem is that no mather what adress you try to acces, the result is index from Folder1.
The code is as follows:
I use WAMPSERVER on Win XP with Apache 2.2.11
Thank you!
On a server (IP xx.xx.xx.xx) I would like to host multiple websites (www.website1.xxx, www.website2.yyy, www2.website3.z zz).
I have assigned www.website1.xxx and www2.website3.z zz the IP xx.xx.xx.xx.
In the www folder of the server I have Folder1 (for website1) and Folder2 (for website3).
Now, the problem is that no mather what adress you try to acces, the result is index from Folder1.
The code is as follows:
Code:
<virtualhost *:80> ServerName website1.xxx ServerAlias www.website1.xxx DocumentRoot c:/wamp/www/Folder1 </virtualhost> <virtualhost *:80> ServerName website3.zzz ServerAlias www2.website3.zzz DocumentRoot c:/wamp/www/Folder2 </virtualhost>
Thank you!
Comment