During the migration process from installing Django FastCgi to Apache, I connect to one in lighttpd.
In Apache, I used the fcgi configuration described in the Django docs. The main part is to rewrite all my non-static URLs to be /mysite.fcgi/$1:
RewriteRule ^/(.*)$ /mysite.fcgi/$1 [QSA,L]
and then forwarding all requests for /mysite.fcgi for FastCGI:
<IfModule mod_fastcgi.c>
FastCGIExternalServer /opt/www/mysite.fcgi -host 127.0.0.1:8000
</IfModule>
The setup worked on Django. If, for example, I went to http://www.mydomain.com/help/, and I typed {{ request.get_full_path }}in a template, the result was /help/. Life was good, and I was happy. However, I ran into some problems that make me switch to a web server that supports more simultaneous connections than Apache can give me.
lighttpd. . URL- mod_rewrite:
url.rewrite-once = ( "^ (/media/.)$" = > "$ 1", "^/favicon.ico $" = > "/med/img/favicon/favicon.ico", "^ (/.) $" = > "/mysite.fcgi$1", )
FastCGI/mysite.fcgi:
fastcgi.server = (
"/mysite.fcgi" => (
"main" => (
"host" => "127.0.0.1",
"port" => 8000,
"check-local" => "disable",
)
),
)
, Django . , http://www.mydomain.com/help/ {{ request.get_full_path }} , /mysite.fcgi/help/. .
, Django , SSL. , sslmiddleware "Stephen Zabel - sjzabel@gmail.com" http://www.djangosnippets.org/snippets/240/. request.get_full_path, lighttpd, Apache. request.path.
- ? , lighttpd mod_rewrite , mod_rewrite Apache. , lighttpd FastCGI Django, sslmiddleware, . sslmiddleware, , mod_rewrite lighttpd URL-.
30- !