Thread: Site Skeletons
View Single Post
Old 29th November 2008, 17:07
geareddesign geareddesign is offline
Junior Member
Join Date: May 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question Can this be done with Apache Directives + Hostingplan?

I am attempting to set up an automated creation of sites from an existing install of Drupal. Would this work?

1) Make a directory /etc/apache/vhost_includes/
2) Make a text file cms.conf inside this directory which contains the rewrite rules you want to add to the vhost.
3) In the apache directives field in ISPConfig you insert: Include /etc/apache/vhost_includes/drupal.conf
4) Save as a Hostingplan Drupal

# web-N is the actual website

# Enable .htaccess on the website

<Directory "/var/www/web-N/web/">
    Options FollowSymLinks
    AllowOverride All

# set up the site directory
# copy needed files from ~/drupal/base)

cp /var/drupal/base/* /var/www/web-N/web/

# make the file directory

mkdir /var/drupal/files/web-N
chmod ug+w /var/drupal/files/web-N

# set up some symlinks

ln -s /var/drupal/includes /var/www/web-N/web/includes
ln -s /var/drupal/misc /var/www/web-N/web/misc

ln -s /var/drupal/modules /var/www/web-N/web/modules
ln -s /var/drupal/profiles /var/www/web-N/web/profiles

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

# make the site file and edit it

mkdir /var/drupal/sites/web-N
cp -r /var/drupal/sites/default/* /var/www/web-N/web/sites/web-N/

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