An issue with lighttpd over apache is rewriting
URLs. Most web based scripts out there are designed for apache and
nothing else. If you want to run another web server then you have to
figure it out yourself, which can be a fun experience.
To get url rewriting working in lighttpd with
href=3D”http://s9y.org”>Serendipity you need to use the following
settings in the lighttpd.conf file
$HTTP["host"] =3D~ "^(www.)?zacgarrett.com" {
server.document-root =3D "/path/to/web/root"
url.access-deny =3D ( ".tpl", ".inc.php", ".sql", ".db" )
server.error-handler-404 =3D "/index.php"
url.rewrite-once =3D (
"^/2006/(.*)" =3D> "index.php?/$1",
"^/2007/(.*)" =3D> "index.php?/$1",
"^/2008/(.*)" =3D> "index.php?/$1",
"^/2009/(.*)" =3D> "index.php?/$1",
"^/2010/(.*)" =3D> "index.php?/$1",
"^/archives([/A-Za-z0-9]+).html" =3D>
"/index.php?url=3D/archives/$1.html",
"^/([0-9]+)[-][0-9a-z-]*.html" =3D>
"/index.php?url=3D$1-article.html",
"^/feeds/(.*)" =3D>
"/index.php?url=3D/feeds/$1",
"^/unsubscribe/(.*)/([0-9]+)" =3D>
"/index.php?url=3D/unsubscribe/$1/$2",
"^/approve/(.*)/(.*)/([0-9]+)" =3D>
"/index.php?url=3Dapprove/$1/$2/$3",
"^/delete/(.*)/(.*)/([0-9]+)" =3D>
"/index.php?url=3Ddelete/$1/$2/$3",
"^/(admin|entries)(/.+)?" =3D>
"/index.php?url=3Dadmin/",
"^/archive$" =3D>
"/index.php?url=3D/archive",
"^/categories/([0-9]+)" =3D>
"/index.php?url=3D/categories/$1",
"^/plugin/(.*)" =3D>
"/index.php?url=3Dplugin/$1",
"^/search/(.*)" =3D>
"/index.php?url=3D/search/$1",
"^/authors/([0-9]+)" =3D>
"/index.php?url=3D/authors/$1",
"^/index.html?" =3D> "/index.php?url=3Dindex=
.html",
"^/htmlarea/(.*)" =3D> "/htmlarea/$1",
"/(.*.html?)" =3D> "/index.php?url=
=3D/$1",
"^/(serendipity.css|serendipity_admin.css)"
=3D> "/index.php?url=3D/$1",
"^/(index|atom|rss|b2rss|b2rdf).(rss|rdf|rss2|xml)$"
=3D> "/rss.php?file=3D$1&ext=3D$2",
)
}
The first five rewrite rules are specific to my site for the
wordpress style permalinks. %year%/%month%/%day%/%title%/
If you use the default permalinks you do not need to use these
lines. I know my links are not perfect, but they are working just fine
for now.





