小编Raj*_*etu的帖子

在Elastic Beanstalk前面的应用程序负载均衡器上终止SSL

好的,所以我非常接近将我的亚马逊生成的SSL终止在ALB上,该ALB放在我在Elastic Beanstalk上运行的Web应用程序之前.

到目前为止我所做的是将一个名为alb-secure-listener.config的文件添加到我的应用程序目录根目录下的.ebextensions文件夹中,该文件的内容如下:

option_settings:
    aws:elbv2:listener:443:
        DefaultProcess: https
        ListenerEnabled: 'true'
        Protocol: HTTPS
        SSLCertificateArns: arn:aws:acm:us-east-1:#############:certificate/####################################
    aws:elasticbeanstalk:environment:process:https:
        Port: '443'
        Protocol: HTTPS
Run Code Online (Sandbox Code Playgroud)

所有###的行都被我的SSL ARN替换.

现在,当我打开https://mywebapp.com时,我得到一个"502 Bad Gateway"页面而不是我的webapp,但该页面 - 但是 - 由我想要使用的SSL证书保护.

打开http://mywebapp.com正常显示该站点.

我想某处有疏忽,但我还没弄清楚它是什么,如果有人有线索请告诉我:D

ssl load-balancing amazon-web-services amazon-elastic-beanstalk

6
推荐指数
1
解决办法
1038
查看次数

动态获取模块

我有一些像这样的模块:

    Drivers/
        a.py
        b.py
        c.py
Run Code Online (Sandbox Code Playgroud)

现在我想根据变量值来调用它们.让我们考虑驱动程序是我将获取变量名称的变量.

    if driver=='a':
        #then call the driver a and execute.
        a.somefunction()
    if driver=='b':
        #then call the driver b and execute
Run Code Online (Sandbox Code Playgroud)

我知道if语句中的驱动程序的值是字符串类型值,而在if语句中我们必须调用模块.有没有办法转换它.??

python module python-2.7

3
推荐指数
1
解决办法
54
查看次数

Geodjango 的 Beanstalk 迁移失败

我想在 aws beanstalk 中部署 geodjango。

我已经尝试过这个解决方案。它以前有效。

commands:
  01_yum_update:
    command: sudo yum -y update
  02_epel_repo:
    command: sudo yum-config-manager -y --enable epel
  03_install_gdal_packages:
    command: yum --enablerepo=epel -y install gdal gdal-devel

packages:
  yum:
    git: []
    postgresql96-devel: []
    gettext: []
    libjpeg-turbo-devel: []
    libffi-devel: []
Run Code Online (Sandbox Code Playgroud)

但是现在它显示了这个错误。

AttributeError: /usr/lib64/libgdal.so.1: undefined symbol: GDALGetMetadataDomainList
   (ElasticBeanstalk::ExternalInvocationError)
Run Code Online (Sandbox Code Playgroud)

这是完整的错误日志

django gdal geodjango amazon-elastic-beanstalk

2
推荐指数
1
解决办法
805
查看次数