I've migrated my teeny-weenie Xen web/mail server to Debian/etch. It hasn't even been rebooted (it would be a shame to spoil the uptime :-) ):
It runs Lighttpd, a small and fast little webserver, popular in the Rails world. Lighttpd with PHP-fastcgi is probably faster than apache, and uses much less RAM.
With etch, I've finally been able to get mod_rewrite to work. So my Zapiro archive has nice URLs now :-)
Lighttpd has a very nice configuration style:
It's more logical than apache, but you have to watch out for rewrite->redirect->rewrite loops. So if you change to a clean URL syntax, you can't put in rewrites from index.php?/uglurl
to /uglyurl
because /uglyurl
rewrites back to /index.php?/uglyurl
, and you get a loop :-)
Comments
Does this work in an .htaccess
Does this work in an .htaccess file? I use apache and thus have a big long htaccess file full of nice little regexp strings - can this be easily translated over to lighttpd?
No, lighttpd doesn't do .htacc
No, lighttpd doesn't do .htaccess files (or anything similar).
Everything goes into the main server config file (or gets sourced/included from there)
Hi, I'm a little confused...d
Hi,
I'm a little confused...does each domain have it's own config file? Surely having 1 config file with rewrite rules would confuse it. What happens if you have 2 domains with different rewrite rules?
Any help would be appreciated :)
Thanks
No, it's all in one config fil
No, it's all in one config file.
You match the domain with a $HTTP["host"] = blah {}, and everything inside that stanza applies to that domain.
Obiviously you could match on other things, too...
It can have multiple files, in
It can have multiple files, in the 7.10 release of ubuntu it runs differents files for each mod .. you can do the same with hosts
How??
So how do you switch to Clean URLs while running lighttpd?
Set up the redirect
Set up the appropriate redirects and then you'll be able to turn them on.
mod_magnet
I love Lua, I love lighty, and that's why I recommend mod_magnet. You could probably implement your own .htaccess-ish support with it fairly easily if you wanted to.
Post new comment