aniss.bouraba
aniss.bouraba

Reputation: 453

Django FastCGI and 500 Internal Server Error

I tried to install Django with FastCGI but without success!. It gives me a 500 Error, but if I execute my ./dispatch.fcgi on shell it gives me the "it works!" HTML page of Django.

Here is my url http://mydjango.webmashing.com

and my dispatch.fcgi file is

#!/usr/bin/python
import sys, os
sys.path.insert(0, "/home/webmashi/.local/lib/python")
os.chdir("/home/webmashi/.local/lib/python/myproject")
os.environ['DJANGO_SETTINGS_MODULE'] = "myproject.settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")

.htaccess file:

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

Upvotes: 1

Views: 1571

Answers (1)

aniss.bouraba
aniss.bouraba

Reputation: 453

I update my python version from 2.4 to 2.6 and it's worked :)

Upvotes: 2

Related Questions