Форум сайта python.su
Проект работает под управлением nginx, демона запуская след образом:
./manage.py runfcgi method=prefork host=127.0.0.1 port=8881 pidfile=/tmp/server.pid maxchildren=10 daemonize=false
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
include /etc/nginx/site.ru;
}
server {
server_name .site.ru;
root /home/seca/seca_game;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
listen 80;
include /etc/nginx/fastcgi_params;
location /media {
root /usr/lib/python2.5/site-packages/django/contrib/admin;
}
location / {
#fastcgi_pass unix:/var/run/django.sock;
fastcgi_pass 127.0.0.1:8881;
include /etc/nginx/fastcgi_params;
}
}
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
#fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
Отредактировано (Авг. 11, 2009 02:20:34)
Офлайн
Смоделировал ситуацию на локалхосте, получил ошибку, no such table: django_session хотя все таблицы в базе присутствуют. Грешу на права доступа, но тупое выставление 777 на базу и проект не помогло. База sqlite. Есть соображения у кого?
Офлайн