Есть у меня проблема - не могу нормально установить django на хосинг.
Пользовался вот этим туториалом
Все установил, Virtual Python, MySQLdb, Django, flup.
С ssh все запускается, syncdb работает, runserver тоже.
А при заходе на страницу выдает:
The requested URL /djangocgi.fcgi/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
.bashrc
# .bashrc # User specific aliases and functions # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi export PYTHONPATH=$PYTHONPATH:$HOME/lib/python2.4/site-packages:$HOME/django_projects export PATH=$PATH:$HOME/lib/python2.4/site-packages/django/bin
djangocgi.fcgi
#!/home/<mylogin>/bin/python import sys sys.path += ('/home/mylogin/lib/python2.4/site-packages') sys.path += ['/home/mylogin/django_projects'] from fcgi import WSGIServer from django.core.handlers.wsgi import WSGIHandler import os os.environ['DJANGO_SETTINGS_MODULE'] = 'djangosite.settings' WSGIServer(WSGIHandler()).run()
AddHandler fastcgi-script .fcgi RewriteEngine On RewriteBase / RewriteRule ^(media/.*)$ - [L] RewriteCond %{REQUEST_URI} !(djangocgi.fcgi) RewriteRule ^(.*)$ djangocgi.fcgi/$1 [QSA,L]
если с шелла запускаю hello.fcgi такого содержания:
#!/home/<mylogin>/bin/python from fcgi import WSGIServer def test_app(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) yield 'Hello, world!\n' WSGIServer(test_app).run()
WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI!
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!
Status: 200 OK
Content-Type: text/plain
Hello, world!