sivaji's blog

sivaji's picture

Setting up drupal multisite on localhost (with Apache Alias)

In this blog post I am going to explain about setting up drupal multisite with Apache Alias and it is a continuation of previous blog post where i explained about using single drupal installation to host more than one site with quiz module branches (quiz 3.x and quiz 4.x) as example.

There we created two sites one for each branches and the sites are accessible from the URL http://quiz3dev and http://quiz4dev

Well that is fine and works out of box. Thanks a ton to drupal. Imagine the case where you want to use the same domain name across the sites and wants to access like

http://mysite.com/site1
http://mysite.com/site2
..
http://mysite.com/siteN

The method described in the previous blog posts uses Apache VirtualHost concepts which requires about 10 lines of entries in Apache configuration file /etc/apache2/sites-enabled/000-default for each site

<VirtualHost *:80>

sivaji's picture

Theming a CCK node

In this blog post i would like to cover a bit about Theming a CCK node. CCK the Content Construction Kit is a drupal contrib module, provides features to extend the fields of drupal nodes.

My goal is to create a product listing directory using CCK / Views and to theme the node similar to the wireframe shown below. I assume the readers are familiar with creating CCK node and page views to list it.

listing-wireframe.png

To proceed with this i am going to use a node type called listing and turquoise theme created by us.

The fields of the listing nodes are as below

  • Product Name - Node Title
  • Description - Node body
  • Product image - CCK Image field
  • Company Name - CCK Text Field
sivaji's picture

Setting up drupal multisite on localhost

This blog post will guide you through the process of creating multisite on localhost. I usually have a couple of drupal installations in my laptop one for each branch of modules that i maintain and rest for testing new drupal themes and modules. I wanted to avoid downloading / upgrading the redundant copy of drupal core so i decided to give a try to drupal multisite feature.

Lets take my GSoC quiz module as an example to explain this. We quiz module developers support branch quiz 3.x and 4.x at the time of writing this blog post. I would like to have quiz-3.x installation at http://quiz3dev and 4.x at http://quiz4dev.

Note: There is no .com or .net domain. It is in local host and similar to http://localhost

The LAMP stack used here is Ubuntu 9.10, PHP 5.2 and Apache 2.x. My Apache's document root is at /home/sivaji/Public/ and the version of drupal that we will be using here is drupal 6.x.

Syndicate content