【发布时间】:2015-03-05 13:39:24
【问题描述】:
我正在尝试将此存储库部署到 Elastic Beanstalk:https://github.com/jordanmessina/test_beanstalk/tree/5e9a919d991adf22bce1a9b8f6c1515e83b1babb,并使用以下配置:64bit Amazon Linux 2014.09 v1.0.9 running Python 2.7
我在部署时收到以下错误:
ERROR: [Instance: i-2eb19dc2 Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: [CMD-AppDeploy/AppDeployStage0/EbExtensionPostBuild] command failed with error code 1: Error occurred during build: Command 01_syncdb failed.
部署后进入网页,看到的都是:Index of /
我的配置文件有问题吗?
更新
我做了一些更改,并设法让应用程序运行并 500ing(进度)。
我已经浏览了代码部署到的实例。我已将问题缩小到设置的mod_wsgi pythonpath。配置如下:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonHome /opt/python/run/baselinenv
WSGISocketPrefix run/wsgi
WSGIRestrictEmbedded On
<VirtualHost *:80>
Alias /static/ /opt/python/current/app/static/
<Directory /opt/python/current/app/static/>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias / /opt/python/current/app/webapp/beanstalk/wsgi.py
<Directory /opt/python/current/app/>
Require all granted
</Directory>
WSGIDaemonProcess wsgi processes=1 threads=15 display-name=%{GROUP} \
python-path=/opt/python/current/app:/opt/python/run/venv/lib/python2.7/site-packages user=wsgi group=wsgi \
home=/opt/python/current/app
WSGIProcessGroup wsgi
</VirtualHost>
我还找到了 httpd 进程的日志(标准 /var/log/httpd/error_log 以供将来参考)并跟踪它们以查看问题所在。问题是 beanstalk.settings 的 ImportError (因为它不在路径上)。
现在我正在尝试一种理智的方法来保持我的应用程序结构(包含我的 django 应用程序的根目录中的 webapp 目录)并更新 mod_wsgi 的 python 路径,所以这个东西可以工作......我很沮丧Elastic Beanstalk 试图强加给我的固执己见的应用程序结构。任何建议都会很棒!
【问题讨论】:
标签: django amazon-web-services mod-wsgi amazon-elastic-beanstalk