I have decided to change my projects server backend from Apache+WSGI to lighttpd+FCGI. Now, everything work fine, except one annoying problem with DOCUMENT_URI, that receives my django server (started as ./manage.py runfcgi … ). It’s always contains /index.fcgi prefix!
Let’s have a look on my lighttpd conf:
fastcgi.server = (
".fcgi" => (
"localhost" => (
"host" => "127.0.0.1",
"port" => 3033,
"check-local" => "disable",
)
),
)
url.rewrite-once = (
"^(/.*)$" => "/index.fcgi$1",
)
According to rewrite rule, http://www.mysite.com/procucts/ request will be changed by mod_rewrite to ....mysite.com/index.fcgi/procucts/, consequently DOCUMENT_URI will be: index.fcgi/procucts/.
But, when I used to work with WSGI on Apache my DOCUMENT_URI does not contains handler script name.
My Apache WSGI settings:
WSGIScriptAlias / /path/to/my/site/index.wsgi
Please give me an advice!