现在位置: 首页 > 所有关于 lighttpd 文章
wordpress 在 lighttpd 上的 URL 伪静态设置
wordpress 在 lighttpd 上的 URL 伪静态设置 url.rewrite for Wordpress on Lighttpd
在WORDPRESS中,设置Customize Permalink Structure为:
Custom structure: /%year%/%monthnum%/%day%/%post_id%.html
伪静态代码如下:
url.rewrite = (
“^/wordpress/?$” => “/wordpress/index.php”,
“^/wordpress/(wp-.+)$” => “$0″,
“^/wordpress/xmlrpc.php” => “$0″,
“^/wordpress/sitemap.xml” => “$0″,
“^/wordpress/(.+)/?$” => “/wordpress/index.php/$1″
)
lighttpd+sqlite的优化和技巧
在error.log看到“(mod_fastcgi.c.2866) backend is overloaded, we disable it for a 2 seconds and send the request to another backend instead: reconnects: 3 load: 4147 /tmp/php.socket”时,说明lighttpd+fastcgi的load较高了。
可按如下步骤优化:
1) 首先检查swap使用情况。如果使用了swap,一般说明php进程数偏多,适当减少php进程。调整max-procs和 PHP_FCGI_CHILDREN的数值,根据公式num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN ),启动时php5进程大概占13M内存,如果num-procs超过200,高峰期php就会占去2G内存,不大合适
2) 安装PHP加速软件。有XCache, eAccelerator和Zend Optimizer。推荐公开源代码的XCache, eAccelerator
3) 调整Keep Alive参数。对于动态程序来说,Keep Alive的意义不大,可以关闭。
server.max-keep-alive-requests = 0
4) 优化程序代码。呵呵,一般也是最有效的;)
CODE:
#### fastcgi module
## read fastcgi.txt for more info
fastcgi.server [...]

最新评论
很强大的一年就要过去了