Probably not the right forum but I'm desperate and I've been looking for hours.
I've got Domain Access installed on a virtual dedicated server account. I am trying to get two different domains (domain1.com and domain2.com, not subdomains) to both point at the same IP address. However, when I create the domains, each domain requires a different user account and thus creates a different document root for each domain (/home/user1/public_html and /home/user2/public_html). Maddening and stupid, since I have no problem at all when I set up Domain Access on a grid server (I can add all the domains I want and they'll all share a documentroot).
So I guess I have a few questions:
1) The hosting company's tech support tells me it's possible to manually redirect a documentroot via SSH. I've scoured the web and I can't find anything explaining this. Can someone point me in a better direction?
2) I'm using the cheapie (free) Simple Control Panel, which is what is requiring that each new domain have its own user. Does anyone know if Plesk or cPanel allows me to manually redirect each domain's docroot? It'll involve reprovisioning but I'm good and ready to do that if I know it'll work.
Thanks!
Comments
Comment #1
croryx commentedcPanel will definitely allow you to do this.
Comment #2
pbeakley commentedWell, I ended up hacking it out another way, by creating a forwarding/masking thing on the second domain and giving up on the Domain Access module. I'll know better in the future, and set up the virtual dedicated server account with cPanel in the future.
Comment #3
pbeakley commentedThis subject came up again, same client, so I did a little more digging and include my findings here for posterity:
If you have a Virtual Dedicated Server that uses the Simple Control Panel, you definitely can edit your document root domain-by-domain. The file is stored at
/etc/httpd/conf.d/turbopanel.conf
Once you're into it it is very obvious which Virtualhost lines to change.
What I did not find out was how to change the settings in Apache so that Simple doesn't automatically write a new Virtualhost line into turbopanel.conf following its standard home/username/public_html format. So for now, I still have to manually edit turbopanel.conf each time we add a domain name. Not a BIG deal but still an annoyance.
EDIT: Also, it appears the old, incorrect documentroot does not change when you go back and review your entry under "Domains" -- it'll look like your docroot is still home/username/public_html, but be assured that it is not. :-)
Comment #4
aosiname commentedI can confirm that this worked on a Go Daddy Virtual Dedicated Server (Centos Option) with Simple Control Panel.
It is annoying that when you create a new domain - it automatically creates a new directory and points your domain there - so you cant do a drupal multisite install.
With this guide - you can. It worked for me.
Thanks
Comment #5
aosiname commentedhmm although i added another site (subdomain to primary domain) and my server automatically switched my turbopanel.conf file to point the old dir (maybe because I didnt delete the old dir)
Comment #6
pbeakley commentedInteresting -- I haven't attempted a subdomain on a multidomain installation yet. I'll bet there's something we can do to rewrite the file that writes turbopanel.conf, but that's beyond my abilities for now.
Comment #7
mattwmc commentedI'm doing this now with GoDaddy and am a total noob to VPS.
What do I need to edit in the turbopanel.conf?
I assume it would be this:
Comment #8
pbeakley commentedYeah, that's the file but there aren't any domains designated yet. Once you start adding domains via Simple Control Panel, additional entries will start appearing, at which point the documentroot lines will be really obvious.
EDIT: Actually, yes, the lines are right there in this example -- the one that says Documentroot, and the line right below it.
Comment #9
aosiname commentedSome of my findings...
The turbopanel.conf is re-written everytime you add a new domain so all your changes are lost.
What you should do is create a file called a_local.conf in the same dir as turbopanel.conf.
Whatever you put in there overrides turbopanel.conf.
So to create a new domain, I dont even use the free simple panel to do it - as it creates a domain user etc.
I just add the lines in my a_local.conf and restart apache web server: /etc/init.d/httpd restart (using su)
This works fine.
The only time i add a new domain is if i want to create email addresses for it.
But I always override turbopanel.conf with a_local.conf
Trust me it works for subdomains and normal domains :)
Anyone know how to install SSL?
I got my certificate from comodo - instantssl.com but cant install it. Https works but no idea where it is pointing AND it is an untrusted cert...
Comment #10
pbeakley commentedDoes the file need to be specifically named a_local.conf?
I assume you just copy/paste the basics out of turbopanel.conf, right?
This is great news if it's this simple. I've got a client for whom I'm building a domain-based franchising thing, and every time we add a new domain, sure enough, I have to go back through turbopanel.conf and make good and sure everything is aimed right.