[stream-of-consciousness]
Could you tell us the actual folder location to url mappings you're trying to implement?
You want *some* of your i-bays to be visible from within domains that are already mapped to other i-bays?
I'd look at /etc/httpd/conf/httpd.conf and copy the section for the 'sub-ibay' in the Primary <VirtualHost> to the desired mapped virtualhost.
One example subsection from my Primary virtual host definition:<VirtualHost 0.0.0.0:80>
ServerName ...
...
# egroupware ibay (eGroupWare)
ScriptAlias /egroupware/cgi-bin /home/e-smith/files/ibays/egroupware/cgi-bin
Alias /egroupware/files /home/e-smith/files/ibays/egroupware/files
Alias /egroupware /home/e-smith/files/ibays/egroupware/html
...
</VirtualHost>
Of course it's easy to copy this code to the desired VirtualHost definition, but I don't know how to template it so that SME won't un-define it for you the next time you make a change in server-manager, unless Apache lets you add another 'VirtualHost' section at the end of httpd.conf that modifies an earlier entry...
You could setup the domain, copy out all of the SME VirtualHost info to another file, add your customizations, delete the virtual domain, then use a custom-template to feed the entire VirtualHost entry back into httpd.conf -- but then you lose the email addresses, pseudonyms, etc...
You could setup the domain, copy out the SME VirtualHost info, then create completely custom templates for the entire VirtualHost subsection - overriding and nullifying the defaults. I think this would require that you copy 20IbayContent to /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts and customize it produce the desired ibay mappings in the desired VirtualHost section...
If you're ambitious you could customize 20IbayContent to look for a new key in domains ("Ibays", type "list" for example) and expand the standard Primary ibay mappings into that VirtualHost section -- then you can add and delete ibay content to virtualhosts by running db domains setprop domain2.com Ibays forums enabled download disabled(this is way, way, way beyond me, but might actually be useful in the Primary domain as well - to allow you to disable a given ibay mapping in the Primary...)
Or, looking at the 80VirtualHosts template fragment, it looks as though you can specify a different path for the httpd.conf templates for any given domain by setting the TemplatePath variable in the domains database...
Or, you can run db domains setprop domain2.com SystemPrimaryDomain yes which causes all of the ibay directives to be added to the 'domain2.com' virtualhost section of httpd.conf (but now you have two domains marked 'SystemPrimaryDomain', which may break something else...)
Or, you could do it manually by adding something like this to the end of your customized 20IbayContent (just before the final "}" in the original version):...
if ($virtualHost eq 'domain2.com')
{
$OUT .= " # manual info from custom 20IbayContent fragment\n\n";
$OUT .= " ScriptAlias /forums/cgi-bin /home/e-smith/files/ibays/forums/cgi-bin\n";
$OUT .= " Alias /forums/files /home/e-smith/files/ibays/forums/files\n";
$OUT .= " Alias /forums /home/e-smith/files/ibays/forums/html\n";
}
Be sure to change 'domain2.com' to your non-primary domain name, and all instances of 'forums' to the desired ibay name...
[/stream-of-consciousness]