Change/Share Document Root?

I have scoured the net for the past two days looking for a way to have a Sub Server, EX: subserver1.domain.com, share the same Document Root as domain.com

It does not seem like it is possible.

What I am trying to do is set up this WordPress mulitblog ‘hack’;

https://github.com/strider72/multiblog

I’ve done it in the past on Kloxo, cPanel and at least one other by simply changing the Document Root.

Is there anyway to do this via Virtualmin/Cloudmin in a click and type fashion OR am I going to have to create SymLinks via SSH. I tried PHP SymLinks with no luck.

Thanks!

Howdy,

Would it be possible to setup the new domain as an alias?

In that case, both the main domain and the alias would share the same documentroot.

-Eric

Hey Eric, so I actually tried that.

I created testuser.domain.com as an alias of domain.com

The resulting document root was home/testuser/public_html

Additionally, the alias/domain does not resolve.

  • Dan

In the case of an alias, both the alias and main domain should point at the same DocumentRoot… you mentioned that’s “/home/testuser/public_html” in this example.

Is that what you’re after?

If so, then it sounds like we may just need to figure out why the domain name wasn’t resolving.

It sounds like you’re seeing a DNS issue of some sort, which is definitely solvable.

-Eric

Here is what I’ve got.

domain.com (where the Wordpress Multiblog is installed and working properly)

What I am after is either

testuser.domain.com

OR

domain.com/testuser

Where either of those share the /home/domain.com/public_html

When I set up the alias I thought it was supposed to have /home/domain/public_html as the document root but i did not. Instead it had /home/testuser/public_html. The subdomain also did not resolve.

I also tried setting up domain.com/testuser and creating a symlink from /home/domain/public_html/testuser to /home/domain/public_html BUT I get a 403 forbidden error when I visit domain.com/testuser

This is how I created the symlink

ln -s /home/domain/public_html/testuser1 /home/domain/public_html

I’ll take either version. I just need it to work.

Thanks!

i got it to work.

I used Alias with no email. Then updated the DNS and VOILA!! The WP install screen appeared on testuser.domain.com

Thanks for your help!

Nuts, I didn’t get a chance to respond to your comment on Monday. But I am glad you’ve figured it out, that’s excellent!

-Eric