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'。 –