0

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?

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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