apache - 在 CentOS 7 中 SSL 连接到 Apache 服务器端口 443
问题描述
我正在尝试在 CentOS 上设置 Apache 服务器。按照本文的步骤“创建虚拟主机”。在这里,我将“80”替换为“443”:
<VirtualHost *:443>
请注意,我没有firewalld
按照那篇文章进行配置。
在/etc/httpd/conf/httpd.conf
文件中,我还将Listen 80
行更改为Listen 443
.
我用以下方式启动服务器:
sudo systemctl start httpd
我检查部署
wget https://my_dns
我收到此错误:
Resolving my_dns (my_dns)... xx.xxx.xx.xxx
Connecting to my_dns (my_dns)|xx.xxx.xx.xxx|:443... connected.
OpenSSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Unable to establish SSL connection.
如果我尝试(测试端口 80)
wget my_dns
我明白Connection refused
了,这是有道理的。
所以,服务器似乎在端口 443 上。但是这个 SSL 问题是什么,我该如何解决呢?
解决方案
侦听端口 443 并不意味着您正在使用 SSL。您可以在您指定的任何端口上侦听 HTTP 请求。这行得通吗?
wget http://my_dns:443
推荐阅读
- file - 标记的最佳视频文件格式是什么?
- android - 是否可以从材料时间选择器中覆盖选定的时间内容描述?
- etl - 将自定义遥测发送到 Application sight 的过程是否考虑了 ETL?
- c# - 在 Windows 窗体中禁用按钮的父控件
- excel-formula - 在Excel中,如何填充列中的空白单元格,行中最后一个非空白单元格?
- mysql - SQLSTATE [HY000] [1045] 用户'root'@'localhost'的访问被拒绝(使用密码:NO) - laravel
- azure-devops - 限制团队访问区域和/或工作项
- azure - Terraform:如何最好地遍历一组目录并为每次迭代应用带有 azure 广告查找的 gen2 ace 块
- c# - 使用 HttpClient 的 NLog 重复属性
- excel - VBA + 宏 + 对于每个单元格条件错误