I’m reading the docs for mod_fastcgi in lighttpd, it says:
“bin-path”: path to the local FastCGI binary which should be started if no local FastCGI is running
What if I want to have lighttpd start directly my fastcgi process, and said process is created by a python script?. Something like this:
# bang omitted... I need to use python from virtualenv
# File runfastcgi.py
import os
import sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "atc.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(['manage.py', 'runfcgi', ... ])
Additionally, I’m using virtualenv, and I have ways of deriving all the paths from the environment, even the path of the python interpreter for the virtualenv… the only problem is that, according to mod_fastcgi documentation, I can only pass the path to a binary, so, it seems that I can not do:
bin-path => (env.ATC_VIRTUALENV + 'bin/python' + ' ' + 'runfastcgi.py')
Am I wrong? Is there anyway of asking lighttpd to use a virtualenv python to execute a custom runfastcgi.py?
It turns out you can put in bin-path the whole command line. They should add that in the documentation.