Simple Drupal Setup

11 posts / 0 new
Last post
#1 Fri, 09/11/2009 - 17:39
jabowery

Simple Drupal Setup

Now that virtualmin.com is running under Drupal, I was wondering if there were a "cheat-sheet" on how best to get Drupal set up under Virtualmin itself.

Note, I'm asking a very basic question having nothing to do with Drupal's capability of supporting multiple domains within itself.

I simply want to make one of my virtual domains a Drupal site and was curious if there were a preferred method of doing so under Virtualmin so that no conflicts arise within the http.conf file over things like support of "clean URLs":

http://drupal.org/node/15365

Fri, 09/11/2009 - 18:05
andreychek

Howdy,

Well, to get Drupal working on this site -- all Joe did is install Virtualmin Pro, create a Virtual Server named "virtualmin.com", and he used the "Install Scripts" feature to install Drupal. It only took a few button clicks! :-)

Drupal should be pretty straight forward to get working though, even if you're using the GPL version of Virtualmin.

The one thing I'd suggest though is running your Virtual Server with suexec enabled -- that's done by default on the Pro version, but can be setup manually using the GPL version of Virtualmin by following the instructions outlined in this forum thread:

http://www.virtualmin.com/node/8462

The clean URL's are all done using a .htaccess file (which I'm pretty sure is provided by Drupal), so you shouldn't have any trouble there.

I know you weren't asking about this, but even the multi-user version of Drupal works pretty well.

If you have any questions as you move forward with that, just give us a yell. Have a good one!

-Eric

Fri, 09/11/2009 - 23:34 (Reply to #2)
jabowery

Thanks!

I take it, then, that Virtualmin Pro's install script does most all of the steps described in this cheat sheet:

http://drasgard.blogspot.com/2009/04/drupal-hosting-on-centos.html

Sat, 09/12/2009 - 00:17 (Reply to #3)
andreychek

Howdy,

Hrm, after having typed out a much longer response, I suspect there may be some confusion in the term "Install Script".

The "Install Scripts" (sometimes called Script Installers) are a feature within Virtualmin Pro that allow you to install web applications with a click of a button.

So if you or one of your users wanted to install, say, Wordpress, rather than going to the Wordpress site, download it, unpacking the files, creating a database, and so forth -- the Wordpress Install Script allows a user to simply click a button to install Wordpress, and Virtualmin does all the work.

The same goes for upgrades -- one click and it's all set!

You of course have the ability to manually perform installations of Wordpress, and Drupal in your case, I'm just outlining a benefit of the Pro version as well as trying to explain why there isn't a checklist :-)

So what using the Install Scripts feature in Virtualmin would get you is it would handle most of what you'd do in Step 7 "Installing Drupal" in the link you offered.

The actual installation of Virtualmin, using the install.sh installer, does handle a good bit of the work and leaves you with a working system. From there, if you're using Virtualmin Pro, you'd be able to install Drupal using the Install Script. If you're using Virtualmin GPL, you'd just need to download Drupal and perform a manual installation.

Does that answer your question?

-Eric

Sat, 09/12/2009 - 09:45 (Reply to #4)
jabowery

"So what using the Install Scripts feature in Virtualmin would get you is it would handle most of what you'd do in Step 7 "Installing Drupal" in the link you offered."

Ah, yes. That's clarifies what an install script is.

Then I guess the next question is to contrast the install script with proper customization of the "template", as discussed in Step 1 of the offered link. For instance, when he says "note that I left the old lines as comments so they're easy to change back for non-drupal sites" doesn't this indicate he is failing to take proper advantage of "Create a template from the default settings." so that one can then make customizations to the new template which will then be used only for Drupal sites?

If so, then the proper selection of Drupal vs Default site would be at:

Create Virtual Server -> Server configuration template

Correct?

And this raises another question about the proper use of custom templates with regard to user created Drupal sites -- especially since that "cheat sheet" seems directed to system administrator users of Virtualmin rather than virtual server users of Virtualmin. This is the "multi-user" use case you referred to above. I may indeed want to go that route eventually. Perhaps there needs to be a wiki page on that.

Sat, 09/12/2009 - 09:57 (Reply to #5)
jabowery

Oh, and I did get myself into a bit of trouble following the offered link's bad advice on how to customize the Mail for Domain -> Mail Aliases for New Domains to be "none":

When, as per those bad directions, I checked "none" in the default template, it wiped out the default values so that I could not revert the default template to its original state because I could not remember them.

What are they, again?

Sat, 09/12/2009 - 10:27 (Reply to #6)
andreychek

The "Mail Aliases for New Domains" option sets up 4 aliases:

  • postmaster
  • webmaster
  • abuse
  • hostmaster

Each of those has the following destination variable set:

${EMAILTO}

Sat, 09/12/2009 - 10:23 (Reply to #7)
andreychek

Howdy,

Yup, it sounds like they could just be making use of multiple Server Templates.

It also doesn't look like they're using suexec + fcgid.

That's one of the goodies that I had linked to earlier (which involves some template customizations), I think suexec provides a wonderful security benefit, plus makes life easier for you once it's up and running :-)

As far as putting Drupal on each Virtual Server goes -- folks using the Pro version would just setup the Drupal Install Script to auto-install each time a new Virtual Server is created.

However, having some files in /etc/skel that get copied in upon Virtual Server creation isn't a bad way at all of handling that with the GPL version.

-Eric

Sat, 09/12/2009 - 13:26 (Reply to #8)
jabowery

So I suppose, then, that likewise:

Add to httpd.conf in the public_html Directory section within the relevant VirtualServer section: AddHandler fcgid-script .php5
FCGIWrapper /home/example/fcgi-bin/php5.fcgi .php

Could be put into System Settings -> Server Templates -> Drupal Server -> Apache Website -> Directives and settings for new websites under:

<Directory /home/drupal_owner/current_drupal>
    AddHandler fcgid-script .php5
    FCGIWrapper ${HOME}/fcgi-bin/php5.fcgi .php
    Options -Indexes IncludesNOEXEC FollowSymLinks
    allow from all
    AllowOverride All
</Directory>

Which means, of course, that:

/etc/drupalskel/fcgi-bin/php5.fcgi

Should contain:

#!/bin/bash
PHPRC=$PWD/../etc/php5
export PHPRC
umask 022
SCRIPT_FILENAME=$PATH_TRANSLATED
export SCRIPT_FILENAME
exec /usr/bin/php-cgi

Assuming of course, that:

System Settings -> Server Templates -> Drupal Server -> Home directory -> Skeleton directory for files = /etc/drupalskel

Also,

/etc/drupalskel/etc/php5/php.ini

should contain a copy of /etc/php.ini

Is that right?

Sat, 09/12/2009 - 13:45 (Reply to #9)
jabowery

BTW, when I try to follow the direction:

To enable it for all future sites, go into System Settings -> Server Templates -> Drupal Server -> Apache Website, then update the option labeled "Default PHP execution mode".

I find no such option.

Mon, 09/14/2009 - 09:13 (Reply to #10)
andreychek

The "Default PHP Execution Mode" is an option that's only available in the Pro version.

You can still effectively change that using the GPL version, you just do so manually -- following the instructions on the suexec + fcgid page changes the execution mode from the default of mod_php to fcgid.

-Eric

Topic locked