Django admin with FCGI + lighttpd

I am running django installation on lighttpd + FCGI. Everything works fine except the admin.

It seems that the redirects after I posted something (i.e. modify sor, create an instance of the model) are wrong.

The administrator redirects me to www.xyz.com/django.fcgi/admin / ..., while django.fcgi should only be used with the lighttp rewrite rule to call FCGI.

Here's the redirection in conf file

url.rewrite-once = (
                "^(/media.*)$" => "$1",
                "^/favicon\.ico$" => "/media/favicon.ico",
                    "^(/.*)$" => "/django.fcgi$1",
)

how can i fix this?

+3
source share
1 answer

URL- SCRIPT_NAME, lighttpd, URL-, . Django , settings.py.

FORCE_SCRIPT_NAME = ""

FORCE_SCRIPT_NAME Django FastCGI docs .

+7

Source: https://habr.com/ru/post/1792192/


All Articles