Hi i'm trying to set up different hosts by name. So i edited the sites available folder to contain two files. "Default" and "site2".
The problem is that no matter which site is made the default, the server always sends the index.html from the document root of one site. As though there was a seperate directive somewhere that is making it the only document root. Strangely after it sends you to the index.html of the other site, you can go to other pages from the site intended. So i'm lost.
Here is what my Default looks like:
Code:
NameVirtualHost *
<VirtualHost *>
ServerName incorrect.com
DocumentRoot /var/www/html/default
</VirtualHost>
site2:
Code:
<VirtualHost *>
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/html/example.com/html
CustomLog logs/www.example.com-access_log common
</VirtualHost>
I then made symbolic links to them in the sites-enabled folder.