Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a python application running on the server, which should process any urls except /wiki. The /wiki url should show a php application.

My virtual host looks like this:

$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",
        )
}

However, I am getting a 404 error for the php app, while the python app (django) is working. All paths are correct and the sockets exist. What is configured wrong here?

share|improve this question

1 Answer 1

Have you checked your paths really carefully? I think "/.../doku.php$1" is wrong, should be "/../doku.php$1" or "/../../doku.php$1". Otherwise everything should work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.