multisite + WHM + PuTTY (with shell access)

Events happening in the community are now at Drupal community events on www.drupal.org.
Anonymous's picture

I'm having a problem with the account creation process in WHM & the multisite configuration per the Drupal install instructions.

My cPanel/WHM history & Drupal:

  • Individual: lunarpages.com: cPanel, no WHM and no root access:
    I was with lunarpages.com for about 3 years, before developing with Drupal. I was purchasing independent hosting packages per account (I think it was around $10/mo if I paid annually.) This was my first exposure to cPanel (no WHM).
  • Shared: networkredux.com: WHM/cPanel, and no root access:
    When I started developing with Drupal I thought I needed to step-up my server management involvement. I moved away from lunarpages.com to networkredux.com (a recommendation from a seasoned Drupal member) and a "shared/resellers" hosting plan - $40/month. I hosted 5-10 websites from this account, before I realized that the "shared" environment wasn't for me: no root access, attacks on the server due to other accounts, etc. 5 months ago I moved to a dedicated server from softlayer.com.
  • Dedicated: softlayer.com: WHM/cPanel, and (yeah!) root access:
    I now lease a dedicated machine from softlayer.com. Between the server and some 24x7x365 support I'm paying a little over $300/mo for a dual core, dual processor, much RAM, etc.
  • My current dedicated server is a LAMP server:

    • Linux: CENTOS Enterprise 4.4 i686
    • Web server: Apache/1.3.37 (Unix) PHP/5.2.1 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a
    • MySQL: 5.0.27
    • PHP: 5.2.1
    • WHM/cPanel: WHM 11.1.0 cPanel 11.2.6-C11817

The point of sharing this history: do you notice a common denominator? That's right - cPanel & WHM. Now I'm not sure if cPanel/WHM is considered ubiquitous, and the server abstraction does have its drawbacks, but for me it's an important tool, and I don't want to "throw the baby out with the bath".

PuTTY & Secure SHell (ssh):

I don't use cPanel at all since having a dedicated server with root access (it's very efficient, and I was told that real geeks don't use GUIs :-). I use WHM for account creation and other server management duties: back-ups, DNS work, etc. In other words, when it comes to Drupal work, I work almost entirely from the command line, but rely on WHM for important server management duties.

If my hypothesis is correct, and WHM/cPanel is here to stay, it would be helpful to update the Drupal install instruction to accommodate this server management software; or better yet, how'bout the multisite group take a leadership role and provide specific instructions for different server environments and developer skill levels. We have a powerful communication technology tool and many members - this should be a slam dunk!

I've conducted several polls over the past 2 weeks, and it would seem (from the limited results) that there are many in the same situation as I: LAMP, WHM, shell access, etc. There are still many of us in the group who still don't have our multisite servers configured, even though we've read, and read and read. Too much conflicting information.

I know there are active members that think this multisite stuff is easy.... If you're reading this, and you fall into this category - I humbly exhort you - please "put your time where your mouth is" and help out. If it's all that easy, it shouldn't be that much work to lay out some basic instructions for those of us in this group who use WHM and have a basic understanding of ssh and PuTTY.

I would like to eventually create a "book" and a video cast that goes into much more detail.

Comments

WHM?

Michael Hofmockel's picture

I am one of those individuals that finds multisite easy. I have had a multisite (4.X) running for two years with 5 websites. I am in the process of creating a 5.x multisite with both MySQL and PostGRES databases.

To tell the truth I had to look up what WHM is? And I avoid CPanel as much as possible. I have a single site hosted on siteground for more than a year now. I tried to use the automated Drupal installation through CPanel but found that I lost a lot of control that way. So I loaded it manually. I think you will find as Developer skill goes up the use of Cpanel and other GUI tools go down.

A dedicated server is truely the way to go if you want to run multisite. Sounds like your on the right path.

I'm not sure Drupal needs more documentation on hosting environments. This documentation would be as endless as the # of hosting environments. Sounds like you need more documentation on your particular hosting environment. In my mind this should be provided by the Host not Drupal. Or maybe you need help with WHM. WHM should provide that documentation.

On the other hand if your issues are understanding Drupal Multisite configurations, this seems like the place to discuss that.
What issues are you having configuring your Multisite? I would be happy to help with Multisite issues.

Regards,
Michael Hofmockel

Open Source || Open Access || Open Mind

Thanks for the help.

Doug Ouverson's picture

cPanel & WHM are a product of the same company. You get cPanel with most hosting accounts out there, and WHM is you're a "reseller" or on a "shared plan".

I agree with the developer and GUI thing. The more "geekie" I become the more I find myself working from the command line. The reason I like WHM (not cPanel necessarily) is because it automates and makes easy several (many critically important) server management duties. So what I'm trying to do is learn at a concrete level and work from a more abstracted level. The key is to not get lazy; maybe even use a good GUI to learn, by asking, "Hey, what's this menu about?, how could I do the same thing from the command line?, etc."

I did have some success today based on 2 or 3 members helping out the last 5 weeks. I'm still going through the process, and have many questions: security, testsite issues, legacy maintenace issues, etc. but I see the light at the end of the proverbial tunnel - it feels good! Thanks for the time, and all the best!

========
Doug Ouverson

cpanel+whm

shrop's picture

At work I run Apple Xserves with multisite. I do most everything via command line. Apache 1.3 (apple compile)/PHP 4.4.x (my own compile)/MySQL 4.1 (apple compile). Apple has a great platform with osx and their hardware.

Now for my freelance projects, I use Linux VPSes at powervps.com. I do run cpanel and whm in that environment. I have thought abut running a plain jane Linux box, but to be honest, cpanel and whm handle email, spam, av for me. I would prefer to just host web for my clients, but many of my clients just need and request basic email. Being an admin for email is a full time job, it helps to have a system in place...

I still do a lot of command line on my Linux VPSes and use WHM when needed. cpanel/whm 11 is being released and has a lot of cool new features.

Thanks,
Shrop

cpanel/whm 11 is being

sime's picture

cpanel/whm 11 is being released and has a lot of cool new features.

WebDav among them.

I've been trying to work out if I'll be automatically upgraded to 11 on existing VPS accounts or whether they just maintain the 10.x version unless I pay to upgrade.

cpanel11

shrop's picture

yeah.. webdav is going to be great.. as long as you can turn it off for security if not needed. I just started using MacFusion for OS X. It allows me to mount my vpses via ssh to the finder. I think that is a great solution for me as admin. I might use the webdav stuff for users as needed once I get a chance to test it out.

My vps folks will allow me to upgrade to cpanel11. I actually can do it now, but cpanel 11 is in the current release tree and I prefer to remain on stable for now.

Is this through WHM that you

sime's picture

Is this through WHM that you can see your the "current release tree"? I mucked around the other day looking for something like this but gave up in the end.

If your server is like mine

sime's picture

If your server is like mine then I make the assumption that the directory system looks like this:
/home/whmcreatedaccount/public_html/addondomain

1/
Having created an account in WHM called "whmcreatedaccount", I add a multisite directory called DRUPAL (or whatever)
/home/whmcreatedaccount/public_html/DRUPAL

2/
Then I use cpanel (why not?) to create individual addon domains. Lets say I add blah.com with the directory "blah". Looking in the directory again:
/home/whmcreatedaccount/public_html/blah/ (which is blah.com's webroot).

3/
OK, then I remove the blah directory: rm -Rf blah
and replace it with a soft link: ln -s DRUPAL blah

4/
Then I add create the /DRUPAL/sites/blah.com/ directory.

5/
Repeat steps 2-4 for each domain in the multisite.

If this doesn't work, I've missed something, this works beautifully for me.

.s

Very interesting....

Doug Ouverson's picture

I'm tracking with you until step 3. Could you elaborate on this step. Thanks much!

========
Doug Ouverson

Sure. Here's step three in

sime's picture

Sure. Here's step three in detail.

After we've created blah.com with the directory blah, cpanel has created the webroot for blah.com:
/home/whmcreatedaccount/public_html/blah/

At this stage you could put in your index.html or drupal, or whatever. By default there might be a directory called "cgi-bin".

We don't want any of this so first we kill the directory. Log into shell and change directories:
# cd /home/whmcreatedaccount/public_html/
Now delete blah. (rm = "remove", -R = "recursive", -f = "force". Take no prisoners!)
# rm -Rf blah

At this point, if we tried to load blah.com, apache is going to report an error, because we've killed the webroot of the blah.com virtualhost. So we proceed immediately to create a softlink. It's basically a shortcut.
(ln = "link", -s = "soft", the target path is "DRUPAL", and the link name is "blah").
# ln -s  DRUPAL blah

Now when Apache tries to load blah.com it will find:
/home/whmcreatedaccount/public_html/blah/
If you list (ls) this directory it will look exactly the same as the DRUPAL directory. Apache, and other software, treat this like a normal directory.

When you're done, you might like to try:
ls -la /home/whmcreatedaccount/public_html
It will show you something like this:

drwxr-xr-x   2 whmuser whmuser 1024 Mar 19 03:07 DRUPAL/              <-- this is the code base.
lrwxrwxrwx   1 whmuser whmuser    5 May 10 22:38 dev5 -> DRUPAL/  <-- a link
lrwxrwxrwx   1 whmuser whmuser    5 May 10 22:37 dev6 -> DRUPAL/  <-- a link
lrwxrwxrwx   1 whmuser whmuser    5 May 10 22:38 blah -> DRUPAL/   <-- a link

Hope this is more clear :)

More than one way to skin a cat....

Doug Ouverson's picture

I'm not sure if the way I'm getting multisite to work is another way of skining the proverbial cat, or if we're talking apples and oranges (sorry for using 2 cliches in one sentence :-)

Now sure whether your "addon" domain senario/solution is another way of accomplishing the same thing, or if your procedure is a solution for another configuration, such as setting up a drupal site in addon.mydomain.com

What I got to work was this:
1.) Created the "master account", what you called "whmcreatedaccount".

2.) I created a new database 'wwwnewsitecom", with permissions, etc., and a new directory in /home/whmcreatedaccount/public_html/sites named "newsite.com"; I put a copy of "settings.php" located in /sites/default into "newsite.com".

3.) In WHM I clicked "Park a domain" and placed "newsite.com" on top of "whmcreatedaccount". It worked great. (I did have what seemed to be a database connection error, but went back and "flushed privileges" and this error went away (?))

After 5 weeks, it was this blasted simple!!! It usually is.

Some things I still need to get straight:
*some of the commands I used to copy settings.php into the newsite.com, and the potential security and maintenance issues.
*getting a local development environment set-up

I'll work on this next week. Today, I'm enjoying the small victory.

I sure appreciate your time. Thanks much....

========
Doug Ouverson

The way I'm doing it now is

sime's picture

The way I'm doing it now is the third way I've successfully configured some sort of multisite. Yes there are a few ways to do it.

I've heard of the park domain thing, haven't tried it. Glad you've got things running!

Copy settings
cp default/settings.php newsite.com/settings.php

Make files directory
mkdir newsite.com/files

Make files directory writable
chmod 777 files
An ftp browser like filezilla is just as easy IMO.

Development/test environment?

Doug Ouverson's picture

Are you running a virtual or local development/test environment? This is my next hill to climb.

========
Doug Ouverson

I'm pretty newb at server

sime's picture

I'm pretty newb at server admin. Webmin is an open source admin tool which I've used on a local linux box - the GUI helped me early on. (Check out the module for Webmin called Virtualmin.)

I do everything on my Mac laptop these days though.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week