ssl - 使用 force-ssl 时无法连接到在 virtualbox 上运行的 meteor 服务器

标签 ssl meteor

我有一台在 virtualbox 上运行 ubuntu 14.x 的 Windows 8.1 机器。我在那个 virtualbox 里面运行 meteor 。我桥接了连接并关闭了两台机器上的防火墙。我可以从虚拟机连接到互联网,并且可以从 Windows 主机远程登录到 ubuntu 机器。

我也可以连接到没有使用 force-ssl 包的 meteor 应用;但是,我无法连接到使用 force-ssl 的 meteor 应用程序!

如果我运行“meteor remove force-ssl”,我可以连接到应用程序。有什么想法吗?谢谢。

编辑 - 通过连接到应用程序,我的意思是主机浏览器中的“http://[ip_address_of_guest]:3000/”。 http 和 https 我都试过了。

最佳答案

我是 Meteor 的新手,但是来自 this documentation ,在我看来您看到的是预期的行为...

"This package, part of Webapp, causes Meteor to redirect insecure connections (HTTP) to a secure URL (HTTPS). Use this package to ensure that communication to the server is always encrypted to protect users from active spoofing attacks.

To simplify development, unencrypted connections from localhost are always accepted over HTTP.

Application bundles (meteor bundle) do not include an HTTPS server or certificate. A proxy server that terminates SSL in front of a Meteor bundle must set the standard x-forwarded-proto header for the force-ssl package to work.

Applications deployed to meteor.com subdomains with meteor deploy are automatically served via HTTPS using Meteor's certificate."

This answer澄清。

我即将尝试 digital ocean 指南,"How To Deploy a Meteor.js Application on Ubuntu 14.04 with Nginx" ,我自己看看它是否正确记录了所需的设置步骤。我会更新我的结果。

关于ssl - 使用 force-ssl 时无法连接到在 virtualbox 上运行的 meteor 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26872139/

相关文章:

mongodb - 我如何使用 Meteor 进行 mongoimport?

javascript - 如何使用 Meteor 创建异步 RESTful 接口(interface)

Azure SSL 和 TrafficManger 实现

ssl - 在安全上下文中,伪装和欺骗有什么区别?

apache - 无法连接(尝试在 ubuntu 中设置 SSL)

css - Bootstrap 包在 Meteor 中不起作用

javascript - Meteor:在定义路线的情况下添加一个类

meteor - 服务在 Angular2 中不能很好地与 *ngIf 一起使用

iis - HTTP 错误 403.16 - 客户端证书信任问题

python - 如何让 web2py 允许常规 http?