Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to create about 500 different mini websites on the same domain. So that www.mydomain.com displays the general information, and www.mydomain.com/site1 displays the information for site1 (as a mini-website) and so on. Each mini-website can have a number of webpages.
Ideally, but not importantly, each mini website would have its own theme. I don't want to install a cms 500 times to achieve this, so I am wondering what other options are available. Could you please suggest? Thanks. Any questions let me know.

Please note that search option is an important feature, for example, if I am visiting www.mydomain.com/site444, and search for "text" then it should search within site444 only (maybe to have a radio option to choose between search site wide or on site444 only etc?).

share|improve this question

migrated from stackoverflow.com Dec 4 '11 at 22:59

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

Use Wordpress multisite with subdirectories. http://developersmind.com/2010/05/17/enable-multi-site-in-wordpress-3-0/

share|improve this answer
Hmm.. thanks for your reply.. WP option is toooo good for what I need Is there anything more simple or basic you know? thx – Kay Jul 4 '11 at 14:51
Can't think of anything! Wordpress is awesome. :) – jessica Jul 4 '11 at 14:54
I agree WP is great. Is it possible to restrict each site to certain users only? so that User1 can edit/post pages of Site1 only? – Kay Jul 4 '11 at 14:57
Yes, definitely. When users are created, you add them to the site(s) you want them to have access to; then they can only see the site(s) they belong to when they log into the admin. – jessica Jul 4 '11 at 15:10
thx. I m not sure if I'll use wp at the moment but I'll see .. – Kay Jul 4 '11 at 15:29

Hippo CMS7 supports multichannel, multilingual and multi-site out of the box. Links between different sites are automatically rewritten, even when the (sub)sites are on different hosts. Currently, a channel manager is being developed to also have a graphical interface to manage all subsites and hosts.

It scales easily to thousands of subsites, where document links between them are resolved out of the box and searching is by default only within the subsite you currently are at. You can add channels to reuse the same content for for example mobile, but for example have a different host or url prefix.

The entire mapping is done by configuration in the CMS itself. There is only a single httpd rule. You can add subsites without restarting the application or httpd.

P.s. I work for Hippo, some I'm not objective. But the good thing about Open source is that you can check the answer ;-)

share|improve this answer

If you're doing this from scratch (implementing a cms, ...) then I don't see why you couldn't set one CMS to display individual site information based on user log in.

Think of it this way: Tumblr has a few million users, and they all use the same CMS, but the information is posted to their individual blogs. And the search results pertain to individual blogs. It's completely reasonable, though perhaps a bit more difficult than Jessica's answer that you use WordPress's multisite thingy.

To make it easy, there are dozens of CMS's that you simply plugin.

share|improve this answer

I thiink what you are looking for is a name-based virtual host:


I use this on my own web servers to serve up multiple sites with drupal on OpenBSD. In /var/www/htdocs I have multiple subdirectories, each with it's own index.php (that's the drupal homepage for each site).

It's pretty easy to setup but you need to configure Apache to use the virtual hosts. Taken from the link above:

For example, suppose that you are serving the domain www.domain.tld and you wish to add the virtual host www.otherdomain.tld, which points at the same IP address. Then you simply add the following to httpd.conf:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain

I guess there are two ways to proceed:

  • (w/o content management system) You write a script to manage the httpd.conf and add an entry for each virtual host. Each subdirectory holds the stuf for your sub-site specific theming.

  • (w content management system) Use something like drupal and setup what they call a multisite installation: http://drupal.org/node/138889

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.