我有一段时间让Phusion Passenger与django-nonrel一起为谷歌的App Engine工作。我似乎可以让它适用于GoogleAppEngineLauncher和生产服务器,但不适用于Passenger;或者对于Passenger和GoogleAppEngineLauncher而不是生产服务器;或者对于Passenger和生产服务器,但不是GoogleAppEngineLauncher。
如何在三者上部署我的应用程序?
答案 0 :(得分:0)
以下是我在Mac OS X Snow Leopard上需要做的事情:
虚拟主机:
<VirtualHost *:80>
ServerName MYAPPNAME.local
DocumentRoot /Users/mike/Projects/ROOT/public
<Directory /Users/mike/Projects/ROOT/public>
AllowOverride all
Options -MultiViews
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
passenger_wsgi.py:
import os, sys
# BUG there must be a better way than listing everything individually...
sys.path.append('/Users/mike/Projects/ROOT/')
sys.path.append('/Users/mike/Projects/ROOT/common-apps/')
sys.path.append('/Users/mike/Projects/NONROOT/django-nonrel/')
sys.path.append('/usr/local/google_appengine/')
sys.path.append('/usr/local/google_appengine/lib/yaml/lib/')
sys.path.append('/usr/local/google_appengine/lib/antlr3/')
sys.path.append('/usr/local/google_appengine/lib/django/')
sys.path.append('/usr/local/google_appengine/lib/cacerts/')
sys.path.append('/usr/local/google_appengine/lib/ipaddr/')
sys.path.append('/usr/local/google_appengine/lib/webob/')
sys.path.append('/usr/local/google_appengine/google/appengine/api/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
希望我没有留下任何重要的内容。