WSGIServer: missing FastCGI param

1.2k Views Asked by At

I'm currently trying to set up my first homepage using Django and have encountered some problems.

The server I've got my project on is running Django in FastCGI-mode and they have supplied me with a quick guide to set the settings I need to run Django, which looks something like this.

mysite.fcgi

#!/usr/bin/local/python
import sys, os

sys.path.append("/home/users/username")

from django.core.handler.wsgi import WSGIHandler
from flup.server.fcgi import WSGIServer

os.chdir("/home/users/username/mysite")

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

WSGIServer(WSGIHandler()).run()

.htaccess

Addhandler fastcgi-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]

When I run manage.py runfcgi I get this message:

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/html; charset=utf-8

<!-- The html from my main template --!>

Help would be much appreciated :)

0

There are 0 best solutions below