beanstalk django http5xx错误

beanstalk django http5xx错误,django,amazon-elastic-beanstalk,Django,Amazon Elastic Beanstalk,嘿,我正试图在aws beanstalk上部署我的第一个django应用程序 但我得到了一个: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at root@localhost to inform them of th

嘿,我正试图在aws beanstalk上部署我的第一个django应用程序

但我得到了一个:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
我将遵循本教程:

我使用Python3.6和django 1.11

我只是创建了一个空白的django项目

部分原木

-------------------------------------
/var/log/httpd/error_log
-------------------------------------

[Mon May 21 18:37:58.898238 2018] [:error] [pid 3353] [remote 172.31.30.216:17272] ModuleNotFoundError: No module named 'alpha_app.settings'

[Mon May 21 18:38:13.914282 2018] [:error] [pid 3353] [remote 172.31.30.216:120] mod_wsgi (pid=3353): Target WSGI script '/opt/python/current/app/alpha_app/alpha_app/wsgi.py' cannot be loaded as Python module.

[Mon May 21 18:38:13.914343 2018] [:error] [pid 3353] [remote 172.31.30.216:120] mod_wsgi (pid=3353): Exception occurred processing WSGI script '/opt/python/current/app/alpha_app/alpha_app/wsgi.py'.

[Mon May 21 18:38:13.914484 2018] [:error] [pid 3353] [remote 172.31.30.216:120] Traceback (most recent call last):

[Mon May 21 18:38:13.914527 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "/opt/python/current/app/alpha_app/alpha_app/wsgi.py", line 16, in <module>

[Mon May 21 18:38:13.914531 2018] [:error] [pid 3353] [remote 172.31.30.216:120]     application = get_wsgi_application()

[Mon May 21 18:38:13.914547 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application

[Mon May 21 18:38:13.914550 2018] [:error] [pid 3353] [remote 172.31.30.216:120]     django.setup(set_prefix=False)

[Mon May 21 18:38:13.914556 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 22, in setup

[Mon May 21 18:38:13.914559 2018] [:error] [pid 3353] [remote 172.31.30.216:120]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)

[Mon May 21 18:38:13.914563 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__

[Mon May 21 18:38:13.914566 2018] [:error] [pid 3353] [remote 172.31.30.216:120]     self._setup(name)

[Mon May 21 18:38:13.914571 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 41, in _setup

[Mon May 21 18:38:13.914574 2018] [:error] [pid 3353] [remote 172.31.30.216:120]     self._wrapped = Settings(settings_module)

[Mon May 21 18:38:13.914578 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 110, in __init__

[Mon May 21 18:38:13.914581 2018] [:error] [pid 3353] [remote 172.31.30.216:120]     mod = importlib.import_module(self.SETTINGS_MODULE)

[Mon May 21 18:38:13.914585 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "/opt/python/run/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module

[Mon May 21 18:38:13.914588 2018] [:error] [pid 3353] [remote 172.31.30.216:120]     return _bootstrap._gcd_import(name[level:], package, level)

[Mon May 21 18:38:13.914593 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "<frozen importlib._bootstrap>", line 994, in _gcd_import

[Mon May 21 18:38:13.914598 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "<frozen importlib._bootstrap>", line 971, in _find_and_load

[Mon May 21 18:38:13.914602 2018] [:error] [pid 3353] [remote 172.31.30.216:120]   File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked

[Mon May 21 18:38:13.914617 2018] [:error] [pid 3353] [remote 172.31.30.216:120] ModuleNotFoundError: No module named 'alpha_app.settings'

但是我不知道如何解决它,我已经找到了解决我自己问题的办法

我忘了创建一个名为
.ebextensions
并将所有内容保存在文件夹
.elasticbeanstalk

显然我不识字

我只希望我的错误能帮别人省几个小时

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "alpha_app.settings")