Arantor wrote:
Just wondered if anyone had tried lighttpd with virtual hosts and url-rewriting?
*snip*
It seems that lighttpd might work better for what I want than Apache might, but I'm not yet sure.
Has anyone here tried this?
I've been running lighttpd for a few months now, using URL Rewriting to get decent URLs from Gallery. I'm doing vhosting via the HOST variable. For example:
Code:
$HTTP["host"] == "www.moregruel.net" {
server.document-root = "/var/www/wordpress"
alias.url = ("/gallery/" => "/usr/share/gallery/", "/gallery" => "/usr/share/gallery", "/albums" => "/var/www/albums")
url.rewrite = (
"^/gallery/([^\.\?/]+)/([0-9]+)$" =>
"/gallery/view_photo.php?set_albumName=$1&index=$2",
"^/gallery/([^\.\?/]+)/([A-Za-z_0-9\-]+)$" =>
"/gallery/view_photo.php?set_albumName=$1&id=$2",
*and so on*
So rewriting is not per-directory via .htaccess, but since you pattern match, you can make it per-directory. It's considerably faster overall than apache 1 on my machine, mostly due to lower memory use. Whether this would meet your needs is up to you.
Steve