【发布时间】:2017-02-21 19:23:11
【问题描述】:
我在 VirtualBox 机器上配置了 Centos 7 操作系统。我已经使用 Openssl 工具安装了 X509 证书并配置了 apache HTTPD 服务器。
我使用 root 在终端上的本地 MAC OSX Seirra (10.12.3) 上通过 SSH 连接到 VirtualBox 上的 Centos7 来宾。
我已验证我的 MAC 上的 /etc/host 正确指向 VirtualBox 上的来宾。还验证了 VirtualBox 上的端口转发,它们都已正确设置,以允许 80 (http) 和 443 (https) 和 22 (ssh) 上的流量。我还确保 Apache 用户对 index.html 和其他具有适当的权限DocumentRoot 文件夹下的文件夹。我还验证了我的 MAC 上的 /etc/host 正确指向了在 VirtualBox 上运行的来宾。
我已将防火墙设置为:
setenforce 0
所以希望这不是 SELinux 问题。
然后我以 Centos7 操作系统的 root 用户身份在终端上运行以下命令:
curl https://localhost -k
我确实得到了默认的 index.html 文件内容。
但是,当我转到我的 MAC OS 浏览器以通过 HTTPS 连接到 VirtualBOX 网站时,我在 Chrome 浏览器上看到以下消息:
无法访问此站点
localhost 拒绝连接。
请注意,我可以通过 HTTP 连接到我的 Vbox CentOS HTTPD 服务器。
那么当尝试使用 HTTPS 访问 apache 服务器时,这里出了什么问题?
【问题讨论】:
标签: macos apache curl virtualbox centos7