I am trying to set up 2 virtual host entries in apache but I'm not sure how to accomplish what I want to do. I have two domain names, both pointing to the same IP Address. I need the DirectoryIndex to be different, which is pretty much the only difference in the entries. I have the following set up:
<VirtualHost *:80>
ServerName firstdomain.com
ServerAdmin
[email protected]
DocumentRoot "/srv/www"
DirectoryIndex /portals/site/index.html
</VirtualHost>
<VirtualHost *:80>
ServerName seconddomain.com
ServerAdmin
[email protected]
DocumentRoot "/srv/www"
DirectoryIndex /portals/site/index_fr.html
</VirtualHost>
Not sure what I need to do differently but the second entry doesn't work. The only real difference is I need the second domain to point to a different DirectoryIndex. If there is a better way to accomplish this, your help would be appreciated.