我已经部署了django based web application successfully in AWS Elastic Beanstalk
。健康状况显示为OK
。日志也是fine
。
我已在安全组的入站规则中允许SSH, HTTP and HTTPS traffic
。
但我仍然无法使用mysite.elasticbeanstalk.com
网址访问我的网站。
我做了ssh并看到python进程已启动并运行 -
[ec2-user@ip-xxx-xx-x-x ~]$ ps -aef | grep python
root 2707 1 0 May13 ? 00:05:00 /usr/bin/python2.7 /opt/aws/bin/cfn-hup
root 2816 1 0 May13 ? 00:00:15 /usr/bin/python2.7 /usr/local/bin/supervisord --nodaemon -c /opt/python/etc/supervisord.conf
netstat -tulpn
命令显示某些进程正在侦听端口80,但我没有看到端口443的任何侦听条目。
这是我的.ebextensions / django.config文件 -
container_commands:
00_collectstatic:
command: "source /opt/python/run/venv/bin/activate && python manage.py collectstatic --noinput"
01_migrate:
command: "source /opt/python/run/venv/bin/activate && python manage.py migrate --noinput"
02_fixture:
command: "source /opt/python/run/venv/bin/activate && python manage.py loaddata site.yaml"
03_oscar_countries:
command: "source /opt/python/run/venv/bin/activate && python manage.py oscar_populate_countries"
test: test ! -f /var/log/my-logs/.semaphore03
99_oscar_countries_populated:
command: "touch /var/log/my-logs/.semaphore03"`
option_settings:
"aws:elasticbeanstalk:application:environment":
DJANGO_SETTINGS_MODULE: "myapp.settings"
"aws:elasticbeanstalk:container:python":
WSGIPath: myapp/wsgi.py
"aws:elasticbeanstalk:container:python:staticfiles":
"/static/": "static/"`
我应该如何进行调试?我被困在这里。