I have a server with a few different domains on it (each in a separate VHost). Each VHost runs fine, executing PHP properly, etc. For the sake of example, two of the domains are foo.com and bar.com. I'm trying to create an alias on foo.com that will include files from a directory on bar.com. Easy, right?
# Apache config file for foo.com
Alias /bar-alias /var/www/vhosts/bar.com/httpdocs/somedir
<Directory "/var/www/vhosts/bar.com/httpdocs/somedir">
Options Indexes FollowSymLinks
Order Allow,Deny
Allow From All
Deny From None
</Directory>
It works fine and dandy, except when trying to run a PHP script. Under my configuration, going to www.foo.com/bar-alias/script.php returns the source code of the script instead of executing it. I've been beating my head against the wall trying to figure out how to get Apache to execute PHP in this way, and I'm drawing a blank.
(If it is at all possible, I'd like to avoid having to do any symbolic linking or stuff like that. This seems like something that I should be able to do purely within Apache's config, I just can't work out how to do it.)