Change/Share Document Root?

7 posts / 0 new
Last post
#1 Thu, 09/17/2015 - 19:37
dndco

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!

Fri, 09/18/2015 - 10:44
andreychek

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

Fri, 09/18/2015 - 14:46
dndco

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
Fri, 09/18/2015 - 15:09
andreychek

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

Mon, 09/21/2015 - 22:13
dndco

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!

Wed, 09/23/2015 - 19:18 (Reply to #5)
dndco

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!

Thu, 09/24/2015 - 10:47
andreychek

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

Topic locked