Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have multiple Django projects, which I run as FastCGI applications like this:

manage.py runfcgi method=threaded host=127.0.0.1 port=<port_no.>

I want to assign aliases to these applications, so that accessing a particular application with this alias will let the Django URL resolver take it from there. So I tried to set it up like this in mod_fastcgi:

fastcgi.server = (
    "/alias1/" => ((
        "host" => "127.0.0.1",
        "port" => "8000",
        "check-local" => "disable"
    )),
    "/alias2/" => ((
        "host" => "127.0.0.1",
        "port" => "8001",
        "check-local" => "disable"
    )),
    "/alias3/" => ((
        "host" => "127.0.0.1",
        "port" => "8002",
        "check-local" => "disable"
    ))
)

And I want to access them like so:

http://127.0.0.1:18000/alias1/my_application/index
http://127.0.0.1:18000/alias1/my_application/login
http://127.0.0.1:18000/alias1/my_application/logout

where 18000 is the modified server.port.

When I try to access the login URL, for example, I get this error:

Using the URLconf defined in urls, Django tried these URL patterns, in this order:

    ^admin/
    ^my_application/
    ^$

The current URL, login/, didn't match any of these.

How can I set up some url rewrite rules such that the URL resolvers in the applications point to the correct URLs? I have already read the documentation, but it is not clear to me.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.