Php lighttpd上的web2py和wordpress

Php lighttpd上的web2py和wordpress,php,python,wordpress,web2py,lighttpd,Php,Python,Wordpress,Web2py,Lighttpd,我在lighttpd服务器上安装了python web2py, 但我想为博客添加wordpress, 问题是我希望wordpress出现在site.com/blog上,而不是作为子域, 如何管理lighttpd配置以运行 url.rewrite-once = ( "^/$" => "/ad", "^(/.+?/static/.+)$" => "/applications$1", "(^|/.*)$" => "

我在lighttpd服务器上安装了python web2py, 但我想为博客添加wordpress, 问题是我希望wordpress出现在site.com/blog上,而不是作为子域, 如何管理lighttpd配置以运行

url.rewrite-once = (
           "^/$" => "/ad",
            "^(/.+?/static/.+)$" => "/applications$1",
            "(^|/.*)$" => "/fcgihandler.fcgi$1", <-- tried to exclude 
            "/blog$" => "$0", <-- tried to exclude /blog from rewriting
    )
但是我做不到, 有什么建议吗

尝试重新编写:

$HTTP["host"] =~ "domain.com" {

server.document-root = "/var/www/app/webroot/"
url.rewrite-once = (
       "^/blog/(.*)$" => "/blog/index.php/$1",
       "^/$" => "/ad",
        "^(/.+?/static/.+)$" => "/applications$1",
        "(^|/.*)$" => "/fcgihandler.fcgi$1",
 )

 }

谢谢各位事实上你们的评论帮了我很大的忙, 它对我的作用如下:

$HTTP["url"] =~ "^/blog(.*)$" {
            server.indexfiles = ("/")
            server.document-root = "/var/www"
    }


 url.rewrite-once = (
            "^/blog(.*)$" => "$0", <-- as @dhunter suggested 
            "^(/.+?/static/.+)$" => "/applications$1",
            "(^|/.*)$" => "/fcgihandler.fcgi$1",
    )

fastcgi.server = (
            ".fcgi" => ("localhost" => (
                    "check-local" => "disable",
                    "min-procs" => "1",
                    "max-procs" => "2",
                    "socket" => "/tmp/web2py.sock"
            )),
            ".php" => ((
                    "bin-path" => "/usr/bin/php-cgi",
                    "socket" => "/tmp/php.socket"
            ))
$HTTP[“url”]=~“^/blog(.*)”{
server.indexfiles=(“/”)
server.document-root=“/var/www”
}
url.rewrite-one=(
“^/blog(.*)$”=>“$0”、“/applications$1”,
“(^ |/.*)$”=>“/fcgihandler.fcgi$1”,
)
fastcgi.server=(
“.fcgi”=>(“本地主机”=>(
“检查本地”=>“禁用”,
“最小进程”=>“1”,
“最大进程”=>“2”,
“套接字”=>“/tmp/web2py.sock”
)),
“.php”=>((
“bin路径”=>“/usr/bin/php cgi”,
“socket”=>“/tmp/php.socket”
))
希望以后对别人有帮助!
谢谢

您是否尝试过将“/blog$”=>“$0”作为重写规则的第一行?检查此项,可能会有所帮助。很高兴它能起作用,我经常使用lighty,但对于mod simple vhost,添加站点是一件轻而易举的事。
$HTTP["url"] =~ "^/blog(.*)$" {
            server.indexfiles = ("/")
            server.document-root = "/var/www"
    }


 url.rewrite-once = (
            "^/blog(.*)$" => "$0", <-- as @dhunter suggested 
            "^(/.+?/static/.+)$" => "/applications$1",
            "(^|/.*)$" => "/fcgihandler.fcgi$1",
    )

fastcgi.server = (
            ".fcgi" => ("localhost" => (
                    "check-local" => "disable",
                    "min-procs" => "1",
                    "max-procs" => "2",
                    "socket" => "/tmp/web2py.sock"
            )),
            ".php" => ((
                    "bin-path" => "/usr/bin/php-cgi",
                    "socket" => "/tmp/php.socket"
            ))