我正在尝试在启用HTTPS的情况下将Flask应用程序部署到AWS Elastic Beanstalk(单个EC2实例)。我成功地部署了没有HTTPS的应用程序版本,但是随后我按照本教程终止了HTTPS:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-singleinstance-python.html
按照文档,我用它们提供的模板代码创建了一个.ebextensions/https-instance.config
文件(此处已截断):
packages:
yum:
mod24_ssl : []
files:
/etc/httpd/conf.d/ssl.conf:
mode: "000644"
owner: root
... CERTIFICATES etc. etc. ...
用我的代码上传,部署失败。检查日志,当yum尝试安装mod24_ssl
时,错误出在配置文件的第一部分:
No package mod24_ssl available
从我的研究(包括此处https://forums.aws.amazon.com/thread.jspa?threadID=222977)看来,我可能想尝试安装其他软件包?我试图将mod24_ssl
替换为mod_ssl
或httpd24-mod_ssl
,但是两者都返回相同的错误(它们各自的包“不可用”。)
非常感谢!谢谢。
请仔细检查您的设置。 mod24_ssl
仅适用于Amazon Linux1。AmazonLinux 2的程序包名称为mod_ssl
。也许您拼错了它,而是改用modssl
?
Amazon Linux 1(mod24_ssl)
yum info mod24_ssl
Loaded plugins: priorities, update-motd, upgrade-helper
Available Packages
Name : mod24_ssl
Arch : x86_64
Epoch : 1
Version : 2.4.43
Release : 1.89.amzn1
Size : 122 k
Repo : amzn-updates/latest
Summary : SSL/TLS module for the Apache HTTP Server
URL : http://httpd.apache.org/
License : ASL 2.0
Description : The mod_ssl module provides strong cryptography for the Apache Web
: server via the Secure Sockets Layer (SSL) and Transport Layer
: Security (TLS) protocols.
Amazon Linux 2(mod_ssl)
yum info mod_ssl
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Available Packages
Name : mod_ssl
Arch : x86_64
Epoch : 1
Version : 2.4.43
Release : 1.amzn2
Size : 115 k
Repo : amzn2-core/2/x86_64
Summary : SSL/TLS module for the Apache HTTP Server
URL : https://httpd.apache.org/
License : ASL 2.0
Description : The mod_ssl module provides strong cryptography for the Apache Web
: server via the Secure Sockets Layer (SSL) and Transport Layer
: Security (TLS) protocols.