Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 弹性豆茎URL根不工作-EC2弹性IP和弹性IP公共DNS工作_Amazon Web Services_Amazon Ec2_Dns_Amazon Elastic Beanstalk - Fatal编程技术网

Amazon web services 弹性豆茎URL根不工作-EC2弹性IP和弹性IP公共DNS工作

Amazon web services 弹性豆茎URL根不工作-EC2弹性IP和弹性IP公共DNS工作,amazon-web-services,amazon-ec2,dns,amazon-elastic-beanstalk,Amazon Web Services,Amazon Ec2,Dns,Amazon Elastic Beanstalk,我正在尝试将Django应用程序(1.11.3)部署到elastic beanstalk(Python 3.4)。我的问题是,当我使用elastic beanstalk url时,我的根路由无法正常工作,但在使用EC2 elastic IP或EC2 elastic IP公共DNS地址时,它可以正常工作 当尝试查看elastic beanstalk url的根路由时,页面从不加载,并以chrome显示ERR_CONNECTION_TIMED_OUT结束。除了路由路由(/members、/conta

我正在尝试将Django应用程序(1.11.3)部署到elastic beanstalk(Python 3.4)。我的问题是,当我使用elastic beanstalk url时,我的根路由无法正常工作,但在使用EC2 elastic IP或EC2 elastic IP公共DNS地址时,它可以正常工作

当尝试查看elastic beanstalk url的根路由时,页面从不加载,并以chrome显示ERR_CONNECTION_TIMED_OUT结束。除了路由路由(/members、/contact等)之外的所有其他路由都可以使用弹性beanstalk url和EC2 IP正常工作

用于创建弹性豆茎的命令:

eb create examplesitename-staging \
      --branch_default \
      --cname examplesitename-staging \
      --database \
      --database.engine postgres \
      --database.instance db.t2.small \
      --database.size 5 \
      --database.version 9.3.17 \
      --instance_type t2.nano \
      --keyname admin \
      --process \
      --region us-east-1 \
      --single \
      --envvars ENV_VARS_ETC=...

正如您所说,example.com运行不正常,但example.com/foo运行正常。。看起来这是您的应用程序问题,而不是云问题。尝试在根位置example.com上放置一个伪index.html。这将有助于您调试我的设置是针对带有单个ec2实例的elastic beanstalk的(中间没有负载平衡器),因此elastic beanstalk有一个公共url example.elasticbeanstalk.com,它生成的ec2实例有一个公共url example.ec2.com。我希望他们也能表现出同样的东西。问题是example.elasticbeanstalk.com不起作用,而example.ec2.com起作用。因为example.ec2.com可以工作,我相信我的应用程序路由正确。请注意,example.elasticbeanstalk.com/foo和example.ec2.com/foo都能正常工作。