alternative for alias

5 posts / 0 new
Last post
#1 Mon, 12/24/2012 - 16:23
edwardsmarkf

alternative for alias

hi all -

i have a multiuser wordpress situation. the setup is very simple, for example:

iLoveVirtualmin.com (parent wordpress site)

each subsequent wordpress installation simply refers to the SAME website location. in other words, say the parent wordpress site is located at "/home/ilovevirtualmin.com/public_html" each subsequent domain just needs to refer to the same file location.

so:

iLoveVirtualminOne.com   ==>> /home/ilovevirtualmin.com/public_html/
iLoveVirtualminTwo.com   ==>> /home/ilovevirtualmin.com/public_html/
iLoveVirtualminThree.com   ==>> /home/ilovevirtualmin.com/public_html/

each of these all refer back to the very same directory as the parent wordpress website. the "wordpress mu domain mapping" plugin takes care of the mapping.

the "alias" option seemed to be working great until i ran into the email issue!

is there some way i can use virtualmin to create a situation like this, where my virtual-servers all share the same public_html directory?

i am thinking i can probably accomplish this by editing my httpd.conf file "DocumentRoot" definition every time, but a product as sophisticated as virtualmin probably has a better solution for me!

thank you all, and Merry Christmas!

Tue, 12/25/2012 - 14:13
edwardsmarkf

hello all -

it appears that Santa has not brought me a solution to my question. i am wondering if this is because i was naughty last year?

this approach appears to work: i create the virtual-server the normal way, and then issue this command:

sed   -i    -e \
 's?/home/iLoveVirtualminONE.com/?/home/iLovevirtualmin.com/?'   \
 /etc/httpd/conf/httpd.conf ;
apachectl   restart       ;

where i just merely redirect any reference to

DocumentRoot

<Directory

from /home/CURRENT to /home/PARENT

but somehow hacking at the httpd.conf file seems rather low-tech and there is probably a much better way.

is it too late to ask Santa for such a request?

Tue, 12/25/2012 - 14:32
Locutus

You could make a special Template for these sites, and put the required DocumentRoot directive in the "Apache website" section.

All new domains you then create using that template would get the modified DocumentRoot. Existing domains you need to modify manually.

Tue, 12/25/2012 - 15:36
edwardsmarkf

Locutus - why are you answering forum questions and not enjoying Christmas?

but either way, thank you for the excellent answer! now go open more presents.

Tue, 12/25/2012 - 16:15
Locutus

Probably same reason why you're asking them instead of enjoying Christmas. ;)

Topic locked