I am trying to set up django for shared hosting on iPage.com using FastCGI, but I am running into a problem all the time. CGI script is placed in the browser as text instead of execution. Below is the .htaccess and fcgi script
.htacess
AddHandler fastcgi-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ cgi-bin/mysite.fcgi/$1 [QSA,L]
and below - fcgi script
import sys, os
sys.path.insert(0, "/home/users/web/b2374/ipg.navtejportfoliocom/django")
os.chdir("/home/user/myproject")
os.environ['DJANGO_SETTINGS_MODULE'] = "tej.settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
What am I not doing right?
source
share