开发者

Changing Fast CGI to run a different version of python

i have a shared web server through Hostmonster. I am trying to install and run Django using python 2.6, however while they have 2.6 installed it is not the default python version. The default version is python 2.4.3, I have installed all the dependencies and Django, however the fcgi script still runs through py开发者_运维技巧thon 2.4. Is there any way that i can force the fcgi script to run 2.6?


On my system which is hosted on tigertech.net (a pretty vanilla hosting service), I configured using excellent advice from

http://www.codekoala.com/blog/2008/installing-django-shared-hosting-site5/

You just need to make sure that the "she-bang" (first line in the .fcgi file) correctly identifies the version of python you want to run.

Assuming that the 2.6 install is located in /usr/bin/python26/, you would then have

#!/usr/bin/python26/python

as the first line of your fcgi file, instead of whatever you have right now. That tells the server which version of python (or whatever) you want the script to be run under.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜