我想部署該回購協議彈性魔豆:https://github.com/jordanmessina/test_beanstalk/tree/5e9a919d991adf22bce1a9b8f6c1515e83b1babb此配置:64bit Amazon Linux 2014.09 v1.0.9 running Python 2.7
的Django 1.7在AWS彈性魔豆 - 應用程序沒有運行,只看到「指數/」
,我發現了以下錯誤在部署:
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 /
是不是有什麼毛病我的配置文件?
UPDATE
我做了一些修改,並設法讓應用程序運行和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 /日誌/的httpd/error_log中以供將來參考)日誌,並拖尾他們,看看有什麼問題了。問題是一個帶有beanstalk.settings的ImportError(因爲它不在路徑上)。
現在我試圖想一個理智的方式來保持我的應用程序結構(包含我的django應用程序的根目錄中的webapp目錄)並更新mod_wsgi的python路徑,這樣這個東西的作品...我非常沮喪以及Elastic Beanstalk試圖推動我的應用程序結構。任何建議都會很棒!
我正在使用單個實例,它可以讓您創建它。我不在乎堅持它,我只是想讓應用程序工作。我將其縮小到用於mod_wsgi配置的pythonpath。現在更新問題。 –
@JordanMessina:嘿,我面臨着同樣的問題..但我太多了,這裏的菜鳥想弄清楚mod_wsgi有什麼變化。你能幫忙...我如何改變aws上的python路徑? – moaglee