Multisite with Drupal 6.13 on Lighttpd 1.4.9

Events happening in the community are now at Drupal community events on www.drupal.org.
CosmoNerd's picture

I am currently running a multisite installation with Drupal 6.13 on Lighttpd 1.4.19 and facing issues when creating Drupal sites in subdirectories.
After reading through countles posts here on the drupal sites, as well on lighttpd I am close to converting back to Apache as I can't get this to work.
The drupal directory structure looks like this

Drupal root: /home/www/drupal/sites

+sites
|______all
|______default
|______domain.com
|______blogs.domain.com
|______blogs.domain.com.blog1
|______blogs.domain.com.blog2

Each of the site directories has a settings.php and a 'files' folder. Symlinks been created for each of the subsites

I can access domain.com and blogs.domain.com without any issues.

However, when I try to run the installer on blogs.domain.com/blog1 and blogs.domain.com/blog2 the site defaults back to blogs.domain.com and renders a drupal site with the Garland theme saying "Page not found
The requested page could not be found."

Also, I edited the settings.php files manually instead of running the installer and modified the base_url with no success.

The vhost config in lighttpd.conf looks like this:

#$HTTP["host"] =~ "blogs.domain.com" {
server.document-root = "/home/www/drupal"
accesslog.filename = "/var/log/lighttpd/domain.com/access.log"
}

The loaded server modules are below:

server.modules = (
"mod_alias", "mod_simple_vhost","mod_evhost","mod_rewrite","mod_redirect", "mod_access", "mod_accesslog",
"mod_status", "mod_fastcgi", "mod_cgi", "mod_compress", "mod_ssi", "mod_usertrack"
}

The rewrite rules for drupal work on all the functional sites.

#### rewrite for drupal
url.rewrite-final = ( "/rss.xml$" => "/index.php?q=rss.xml",

### Rules for FCKEditor within Drupal
"^/sites/all/libraries/fckeditor/editor/(.*)$" => "/sites/all/libraries/fckeditor/editor/$1",
"^/sites/all/modules/ajax/plugins/fckeditor/(.*)$" => "/sites/all/modules/ajax/plugins/fckeditor/$1",
"^/fckeditor/(.*)$" => "/$1",

### IMCE Image Browser path correction
### "^/system/files/(.*)$" => "/sites/default/files/$1",

### Rules for Clean URL's
#"^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
#"^/search/(.*)$" => "/index.php?q=search/$1",
#"^/([^.?]*)$" => "/index.php?q=$1",
#"^/([^.?]*\.html)$" => "/index.php?q=$1",
#"^/([^.?]*\.htm)$" => "/index.php?q=$1"

"^/(files/.*)$" => "/$1",
"^/system/test/(.*)$" => "/index.php?q=system/test/$1",
"^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
"^/([^.?]*)$" => "/index.php?q=$1",
"^/search/node/(.*)$" => "/index.php?q=search/node/$1"

)

Any suggestions?

Comments

There's a Lighty group on

Garrett Albright's picture

There's a Lighty group on g.d.o. I suggest you join it.

Anyway, here's an important question; do you have clean URLs enabled in Drupal on your site?

Thank you for the response

CosmoNerd's picture

Thank you for the response and link to the group.

Clean URL's are enabled in Drupal on all sites i can access (blogs.domain.com, and domain.com).

Hmm, and everything else

Garrett Albright's picture

Hmm, and everything else works fine?

What about if you disable clean URLs, and then try going to http://blogs.domain.com/?q=blog1 ? Does that work?

Yes, everything else works

CosmoNerd's picture

Yes, everything else works fine, and I keep scratching my head.

I disabled Clean URL's and tried http://blogs.domain.com/?q=blog1, unfortunately with no luck.

Also, I inserted a print statement in every settings.php for debugging purpose like this: print "blogs.domain.com.blog1",
and can see that Drupal only processes sttings.php from blogs.domain.com ... hmmm

Looks almost like Drupal is not searching all subfolders within the sites directory ... but that seems kind of odd.

So I created a new domain, domain2.com and created a subfolder domain2.com.test but with the same outcome.
When i try opening the site domain2.com/test, Drupal falls back to domain2.com.

Hmm. Sorry, I'm out of

Garrett Albright's picture

Hmm. Sorry, I'm out of ideas. =/

View this it might help

dadamo's picture

I was viewing this and it has some helpful information http://gotdrupal.com/videos/multisites-vs-multiple-sites

Lighttpd rewrite rules

karthick62's picture

Hi,

I am trying to write a clean url of my site. This is the structure of the site

www.example.com
www.example.com/site1
www.example.come/site2
;
;
; www.example.com/siten

site1 ... siten are installed as subdirectories. I tried the following clean url for subdirectory and the main site.

  1. For subdirectory (www.example.com/site1) => "^/([^/])/(?!(misc|themes|modules|files|test|system|sites|.xml|.html|.css|.js))([^?])\??(.*)$" => "/$1/index.php?q=$3&$4" (Tested OK for subdir)

  2. For Main site (www.example.com) => "^/([^.?]*(.xml|.html)?)(\?(.+))?$" => "/index.php?q=$1&$4" (Tested Ok for main site)

I have been facing problems if I use both(main site and subdirectory) clean url rewrite rules under same url.rewrite in lighttpd.conf

Issue 1:

The rewrite url for the subdirectory is working fine and I am able to access all the pages but no pages in the main site.

Issue2:

If I test the main site with the clean url () alone in the rewrite rule, the pages for the main site are getting properly.

Can anyone help in sorting out this issue?

I would need a rewrite url which should satisfy the clean url conditions of both mainsite and subdirectory.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: