我有一个在服务器上运行的 python 应用程序,它应该处理除/wiki
.该/wiki
url 应显示一个 php 应用程序。
我的虚拟主机如下所示:
$HTTP["host"] == "domain.tld" {
fastcgi.server = (
"/django.fcgi" => (
"main" => (
"socket" => "/tmp/django.sock",
"check-local" => "disable",
)
),
".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
url.rewrite-once = (
"^(/wiki.*)$" => "/.../doku.php$1",
"^(/.*)$" => "/django.fcgi$1",
)
}
但是,当 python 应用程序 (django) 正在运行时,我收到 php 应用程序的 404 错误。所有路径均正确且套接字存在。这里配置错了什么?
答案1
你真的仔细检查过你的路径吗?我认为“/.../doku.php$1”是错误的,应该是“/../doku.php$1”或“/../../doku.php$1”。否则一切都应该有效。