View Single Post
  #1  
Old 17th November 2008, 21:39
geareddesign geareddesign is offline
Junior Member
 
Join Date: May 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question How do I setup ISPConfig for secure drupal [multisite]?

I am setting up a Linode.com 360 server with Ubuntu 8.04 LTS Disk Image using the guide The Perfect Server - Ubuntu Hardy Heron (Ubuntu 8.04 LTS Server). Since my primary use for this server is for Drupal I am using the guide a more secure drupal [multisite] install to build my server folder structure and Drupal multi-site configuration.

I thought I understood everything until I got to the discussion on the multi-site writeup about this script:

Code:
#!/bin/sh

if [ $# -lt 2 -o $# -gt 2 -o "$1" = "--help" ]; then
	echo 1>&2 Usage: $0 webname example.com
	exit 127
fi

# set up the site directory
#	(i have .htaccess, robots.txt, and all the php include files mentioned in
#	http://justinhileman.info/blog/2007/06/a-more-secure-drupal-multisite-install
#	saved in a folder called ~/drupal/base)
cp  /var/drupal/base/* /var/www/$1/web/

# make the file directory
mkdir /var/drupal/files/$1
chmod ug+w /var/drupal/files/$1

# set up some symlinks

ln -s /var/drupal/includes /var/www/$1/web/includes
ln -s /var/drupal/misc /var/www/$1/web/misc

ln -s /var/drupal/modules /var/www/$1/web/modules
ln -s /var/drupal/profiles /var/www/$1/web/profiles

ln -s /var/drupal/themes /var/www/$1/web/themes
ln -s /var/drupal/sites /var/www/$1/web/sites
ln -s /var/drupal/sites/all /var/www/$1/web/sites/all
ln -s /var/drupal/files/$1 /var/www/$1/web/files

# make the site file and edit it
mkdir /var/drupal/sites/$2
cp -r /var/drupal/sites/default/* /var/www/$1/web/sites/$2/

# append some stuff to the end of the new settings file
echo "\$conf = array('file_directory_path' => 'files/$1', 'file_directory_temp' => 'tmp');" >> /var/www/$1/web/sites/$2/settings.php

# i usually enter the db config by hand in vim. you could easily
# echo the db config to the end of the settings file kinda like above.
vim /var/www/$1/web/sites/$2/settings.php
How do I use/implement this? Where does it go?

I've been researching this for 3 weeks and I want to do everything right. This is the last piece of the puzzle. I would like to be able to automate the folder structure/creation for the Drupal sites without removing the ability to add html/php only sites, but it isn't a deal breaker.

If I can get this answered I am going to post my own write up merging all the tutorials into the configuration I implement. Many Druapl developers will benefit from this scenario. Thanks.

Last edited by geareddesign; 18th November 2008 at 08:27. Reason: making it a question
Reply With Quote
Sponsored Links