I’m wondering if anybody else has had a similar issue to what I’m having at the moment.
I have a domain, say www.example.com
I have 2 websites I wish to run from this domain, so I figure I could use Apache’s mod_alias. Here’s what I have:
[size="2"]Yii website installed to /path/to/website1[/size]
[size="2"]Yii website installed to /path/to/website2[/size]
[size="2"]In Apache, I have set up aliases as such:[/size]
ServerName www.example.com DocumentRoot "/path/to/website1" Alias "/w1" /path/to/website1 Alias "/w2" /path/to/website2 <Directory /path/to/website1> Options FollowSymLinks +ExecCGI +Includes AllowOverride All DirectoryIndex index.html index.php </Directory> <Directory /path/to/website2> Options FollowSymLinks +ExecCGI +Includes AllowOverride All DirectoryIndex index.html index.php </Directory>
[size="2"]All is well, and I can get both websites to open their homepages with the links:[/size]
But, as soon as I click anything on website2 it just loads website1’s homepage. If I remove the “DocumentRoot” line, then it fails completely because it tries to use the main Apache DocumentRoot rather than the VirtualHost, and it says:
/var/www/html/path doesn’t exist. It’s trying to hit /var/www/html/path/to/website1/index.php which obviously doesn’t exist.
I hope I explained that properly, and that somebody may have come across this problem before. Can anybody help point me in the right direction please?