-bash-3.2$ dir
dispatch.cgi stats
-bash-3.2$ ./dispatch.cgi
': [Errno 2] No such file or directoryile '
这是dispatch.cgi
:
#!/usr/local/bin/python2.7
import sys, os
sys.path += ['/home/content/88/10907688/lib/venv/lib/python2.7/site-packages']
sys.path += ['/home/content/88/10907688/lib/venv/bin/gccFishing']
os.environ['DJANGO_SETTINGS_MODULE'] = 'gccFishing.settings'
from flup.server.fcgi import WSGIServer
from django.core.handlers.wsgi import WSGIHandler
WSGIServer(WSGIHandler()).run()
为什么dispatch.cgi没有被执行?
答案 0 :(得分:1)
尝试为脚本提供适当的权限
chmod +x dispatch.cgi
并确保您的python路径正确
which python2.7