multisite setup on debian

the drupal5 package installs drupal in /usr/share/drupal5, with config files in /etc/drupal/5. with a multi-site setup, this is the codebase that will be used by all of the sites. in theory it will be updated by the package-manager.

the following is based on http://drupal.org/getting-started/5/install/multi-site

to make a new site:

make a VirtualHost in /etc/apache2/sites-available/new_site

<VirtualHost *>
        ServerAdmin admin@example.com
        DocumentRoot /usr/share/drupal5
        ServerName new-site.example.com

        <Directory "/"> 
               Options FollowSymLinks
               AllowOverride None
        </Directory>

        <Directory "/usr/share/drupal5">
               Options Indexes FollowSymLinks MultiViews
               AllowOverride None
               Order allow,deny
               allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature Off
</VirtualHost>

then symlink this VirtualHost from /etc/apache2/sites-enabled

cd /etc/apache2/sites-enabled
ln -sf ../new-site 001-new-site

also you need to make a new site config directory in /etc/drupal/5/sites. the easiest way to do this is to copy the “default” site:

cp -r /etc/drupal/5/sites/default /etc/drupal/5/sites/new-site.example.com

the name of the directory needs to be the domain under which the site will be accessed.

make sure that both the dbconfig.php and settings.php files are writeable by www-data.

chown .www-data /etc/drupal/5/sites/dbconfig.php /etc/drupal/5/sites/settings.php
chmod g+w /etc/drupal/5/sites/dbconfig.php /etc/drupal/5/sites/settings.php

before you have a real domain setup, you can edit your /etc/hosts file on your local machine and add an entry that points the domain at the ip address of the server. eg:

78.46.38.135 new-site.example.com

possibly you also need to add this to the server /etc/hosts file???

now if you visit the new-site.example.com, it should run the installation script and set up the database.

  • flickr integration?
  • how to do lists of related links
  • what is cck? ;)
  • can you link to the page of a paged view that contains a particular node?
    • looking at the code in includes/pager.inc it looks like no.
    • would this work with an image gallery?
      • seems to use the same pager code. finding this out would require an extra query from the database.
  • how do you use imagecache?
    • it normally seems to need custom theming, but you can access the generated pics at /files/imagecache/NAMESPACE/FILENAME
    • from the imagecache README.TXT:
      print theme('imagecache', $ruleset_namespace, $image['filepath'], $alt, $title, $attributes)
  • can a normal image_gallery work with a non “image gallery” tag?
    • yes, /gallery/tid/XX where XX is the id of the tag.
    • but since galleries can't really be included in anything else (views, panels etc) they are kind of useless.
  • how would i do a view-like taxonomy query in mysql? (doesn't the devel module tell you this stuff?)
    • select * from node join term_node where node.nid=term_node.nid and tid=63;
    • select * from node join term_node, term_data where node.nid=term_node.nid and term_node.tid=term_data.tid and term_data.name="xmedk";
    • nicer:
      select * from node join term_node on  node.nid=term_node.nid join  term_data on term_node.tid=term_data.tid where term_data.name="xmedk";
  • how do breadcrumbs work? are they like a back button, or is there some other hierarchy? how is it defined?
  • manually setting the teaser breakpoint: http://drupal.org/node/176829
  • what happens when you upload two images with the same name?
    • the clash gets resolved automatically _0 (etc) is appended.
  • where do you set the front page?
    • admin/settings/site-information

see also delta_notes

  • drupal_notes.txt
  • Last modified: 2008-03-31 17:24
  • by 81.188.78.24