Hi,

while trying to run Shindig and Partuza with the lighttpd server, i ran into
some problems with the configuration,

As others may want to use a similar setup, i decided to share my solution
with this list.

Here is the interesting part of the config file:

===============<==============<=====================
$HTTP["host"] == "shindig" {
cgi.assign      = (
".php" => "/opt/local/bin/php-cgi"
)

    server.document-root = "$YOURPATHHERE/shindig/php/"
    server.name = "shindig"


url.rewrite-once = (
"^[^?]*(\??)(.*)$" => "index.php$1$2"
)


}



$HTTP["host"] == "partuza" {
cgi.assign      = (
".php" => "/opt/local/bin/php-cgi"
)

    server.document-root = "$YOURPATHHERE/partuza/html"
    server.name = "partuza"

url.rewrite-once = (
"^\/(css|images|js|gadgets)(.*)$" => "$0",
"^[^?]*(\??)(.*)$" => "index.php$1$2"
)


}

================<================<=========================

Some annotation about this solution, as some of this may one day apply to
Apache also.

There are some differences between Apache and lighttpd handling the rewrite
rules. The first one is that when Apache rewrites a URL the $_GET array
contains all original parameters even if they are no longer part of the
request. Lighttpd only puts parameters into the $_GET which are part of the
final request. I solved this (i hope) by simply appending the parameters to
the index.php request.

The second one is that it is not possible(AFAIK) to make rules depending on
the file type. Therefore for partuza all files which should be served
directly have to be put into the redirection rule.

Obviously if you have a different path to the php cgi or are using fastcgi
you have to change that, too.

Best Regards

Karsten Beyer
[EMAIL PROTECTED]

Reply via email to