0
我真的嘗試部署與Apache和mod_wsgi的金字塔web應用程序,但我得到錯誤500的消息DistributionNotFound:多雲金字塔部署Web應用程序(阿帕奇/ mod_wsgi的)
任何人有任何想法?項目結構是這樣的:
- cloudyapp
- 陰天
- 靜態
- 模板
- cloudy.egg-信息
- application.wsgi 個
- production.ini
- 陰天
我的文件
Application.wsgi
from pyramid.paster import get_app, setup_logging
import os, sys
sys.path.append('/var/www/cloudyapp/')
os.environ['PYTHON_EGG_CACHE'] = '/var/www/cloudyapp/'
ini_path = '/var/www/cloudyapp/production.ini'
setup_logging(ini_path)
application = get_app(ini_path, 'main')
Production.ini
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.6-branch/narr/environment.html
###
[app:main]
use = egg:cloudy
pyramid.reload_templates = false
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
###
# wsgi server configuration
###
[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.6-branch/narr/logging.html
###
[loggers]
keys = root, cloudy
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
[logger_cloudy]
level = WARN
handlers =
qualname = cloudy
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s
的apache的conf
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/cloudy.crt
SSLCertificateKeyFile /etc/apache2/ssl/cloudy.key
WSGIScriptAlias//var/www/cloudyapp/application.wsgi
DocumentRoot /var/www/cloudyapp/
Options -Indexes
# Uncomment the line below if your site uses SSL.
SSLProxyEngine On
</VirtualHost>
找出來。張貼在這裏以防別人想知道的情況。我忘了運行setup.py開發。 – sopor
我有這個相同的問題,並且找不到解決方案。雖然我試圖在AWS Elastic Beanstalk上部署我的應用程序。你知道是否重要,你運行'python setup.py develop'而不是'python setup.py install'。 –