after hours of trying, here the final config data for my WordPress/Lighttpd dualism:
lighttpd.conf:
$HTTP["url"] =~ "\.php$" {
proxy-core.balancer = "round-robin"
proxy-core.allow-x-sendfile = "enable"
proxy-core.protocol = "fastcgi"
proxy-core.backends = ( "unix:/tmp/php-fastcgi.sock" )
proxy-core.max-pool-size = 16
}
20-tschitschereengreen.conf
# WordPress Blog
$HTTP["url"] =~ "^/blog" {
proxy-core.rewrite-request = (
"_pathinfo" => ( "^/blog(/.*)" => "$1" ),
"_scriptname" => ( "^/blog/(.*)" => "/blog/index.php/$1" )
)
url.rewrite = (
"^/blog/(wp-.+)$" => "$0",
"^/blog/xmlrpc.php" => "$0",
"^/blog/sitemap.xml" => "$0",
"^/blog/(.+)$" => "/blog/index.php/$1"
)
server.error-handler-404 = "/blog/index.php"
}
This entry was posted on Saturday, March 22nd, 2008 at 9:51 pm and is filed under PHP. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Hi Jirka,
Wow… the whole move sounds like a transition-and-a-half!
Not sure if it’s an option, but if you do also move your blog to something django-based, like byteflow which can import from WordPress (disclaimer: haven’t tried), you could then use django.contrib.redirects rather than lighttpd rewrites for your important old urls – easier to manage although much more verbose (no regex).
just for my notes: starting the php-fastcgi nodes:
[block]/usr/local/bin/spawn-fcgi -s /tmp/php-fastcgi.sock -f /usr/bin/php-cgi -u www-data -g www-data -C 5 -P /var/run/spawn-fcgi.pid[/block]