Siavash
Siavash

Reputation: 368

FastCGI Dynamic Server Config. for Django/Apache

I'm trying to run Django 1.4 with Pyton 2.7, Flup and mod_fastcgi on Apache. So what I did was:

  1. Add mod_fastcgi to httpd.conf
  2. Create two files : .htaccess and index.fcgi in my public web root inside a directory called portal - c:\xampp\htdocs\portal - the actual Django project is in d:\projects\portal so inside index.fcgi I have the following:
#!C:/Python27/python.exe
import sys, os
from django.core.servers.fastcgi import runfastcgi

sys.path.append("D:/projects/portal")
os.environ['DJANGO_SETTINGS_MODULE'] = "portal.settings"

runfastcgi(method="threaded", daemonize="false")

But when running localhost/portal/ I get the following error in my Apache error.log

File "C:\Python27\lib\site-packages\flup\server\fcgi_base.py", line 1020, in _setupSocket
    'If you want FCGI, please create an external FCGI server '

It's telling me to create an external FCGI server which I could but I need it to be on a dynamic server. Any ideas?

Update: My setup is on a Windows server. I can also start a Linux server so the question is more of Apache, FastCGI and adding sites witout changing any config on the server - Apache/FastCGI Server

Upvotes: 2

Views: 371

Answers (1)

jpic
jpic

Reputation: 33420

You did not start your fcgi server.

Upvotes: 1

Related Questions