Posted by Ansgar Berhorn
on April 15, 2007
Jan Kneschke, the creator of lighttpd gives some hints on simplifying the configfiles of the lighttpd with inlcudes. The idea can be extended to include also a redirection from “domain.tld” to “www.domain.tld” or vice versa.
A generic incl-redirect-subdomain.conf:
$HTTP["host"] != servername {
url.redirect = (
“^/(.*)” => “http://” + servername +”/$1″,
)
}
uses the variable “servername” to distinguish where all requests different to the main domain shall be redirected.
Jan’s example can then be extended to with an include:
$HTTP["host"] =~ “^(www\.)?example\.org$” {
var.servername = “www.example.org”
var.authdir = “/download/”
include “incl-redirect-subdomain.conf”
include “incl-docroot.conf”
include “incl-auth-htpasswd.conf”
}
With this include, all request for the pure domain, get redirected to “www.example.org” as defined by “var.servername”.
Posted by Ansgar Berhorn
on April 05, 2007
Ok, it is 2007 and I am still a fan of phpAutoGallery. The software is small and smart and is still serving my needs.
phpAutoGallery only works with rewrite rules for the mod_rewrite of the Apache httpd. lighttpd has something similar, but is not source compatible to the Apache.
The httaccess rewrite rule for the Apache is:
RewriteCond %{REQUEST_URI} !.*__phpAutoGallery/wrapper\.php.*
RewriteRule .* /__phpAutoGallery/wrapper.php [NE,QSA,L]
The ligthtpd does not support per-directory rewrite rules, but it has a mod_rewrite.
A working rule for this scenario for the lighttpd is this one:
url.rewrite-once = ( "^/__phpAutoGallery/wrapper.php.*$" => "$0",
"^/([^.]+)?” => “/__phpAutoGallery/wrapper.php?$1″)
Links:
Mod_rewrite documentation for the lighttpd ,
Typo3 on lighttpd
Posted by Ansgar Berhorn
on Dezember 29, 2006
I thought I gave away a good Christmas present with that U3 memory stick.
Now I have to work around the missing i18n support of the U3 software suite. At least some important parts (e.g. the launchpad) are localized. But not even the most popular applications (Firefox and Thunderbird) in the software repositories come along as German versions.
Links to get around the issue:
Posted by Ansgar Berhorn
on November 27, 2006
I have switched the delivery of Typo from Apache-Proxy/Mongrails to Apache-Proxy/lighttpd-fastcgi .
The change is noteable. The pages of the blog are loading way faster now. This is still a subjective point of view. I guess that running via fastcgi gives the biggest progress. But overall it is sweet to see a 1MB lighttpd process coming up in the tasklist instead of a 20MB+ Apache process.
I had some unsuccessful tries to get the fastcgi running with Apache. With lighttpd now it was a really simply task.
The only thing that is left now is to get rid of the Apache-proxy and put lighttpd in the first row.
Resources:
Installing Typo on dev411.com
Posted by Ansgar Berhorn
on November 12, 2006
Last night we have been to Milwaukee and watched the NBA basketball game Milwaukee Bucks vs. Utah Jazz in the Bradley Center in Milwaukee.
In the beginning the game was pretty lame. Jazz was dominating the Bucks. Jazz was steadily 20 points ahead and in the beginning the Bucks were not able to alter that.
In the second half Michael Redd turned up the heat, scored several tree-point shots in a row and brought the Bucks back in the game. In the end the bucks lost 111-113 after they managed to get to 111-111 12 seconds before the end.
Some pictures: