我正在尝试为 Amazon EC2 实例的端口 4100 启用 SSL。当我访问网站时https://test.example.com:4100/login,我收到以下错误 - 此服务器上未找到请求的 URL /login。有人可以帮帮我吗?
我已经修改了httpd配置文件如下 -
<IfModule mod_ssl.c>
NameVirtualHost *:4100
Listen 4100
</IfModule>
<VirtualHost *:4100>
ServerName test.example.com
SSLProxyEngine on
SSLEngine on
SSLCertificateKeyFile /etc/letsencrypt/live/test.example.com/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/test.example.com/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/test.example.com/fullchain.pem
DocumentRoot /var/www/html/
ssl.conf
Listen 443
<VirtualHost _default_:443>
SSLProxyEngine on
SSLEngine on
SSLCertificateKeyFile /etc/letsencrypt/live/test.example.com/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/test.example.com/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/test.example.com/fullchain.pem
<VirtualHost>
答案1
在以下几行的 ssl.conf 中,将 443 替换为 4100
收听 443
虚拟主机默认:443
然后重新启动 apache。
另外,在 AWS 安全规则中添加自定义规则/TCP 以监听端口 4100