Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.