简体   繁体   English

通过HTTPS运行Node.js应用

[英]Run nodejs app through HTTPS

I have a node app that is setup on SSH by running node osjs run --hostname=dc-619670cb94e6.vtxfactory.org --port=4100 . 我有一个通过运行node osjs run --hostname=dc-619670cb94e6.vtxfactory.org --port=4100在SSH上安装的节点应用程序, node osjs run --hostname=dc-619670cb94e6.vtxfactory.org --port=4100

It starts at http://dc-619670cb94e6.vtxfactory.org:4100/ without problems, but instead I want to serve it through HTTPS https://dc-619670cb94e6.vtxfactory.org:4100/ , where I receive an error ERR_CONNECTION_CLOSED . 它始于http://dc-619670cb94e6.vtxfactory.org:4100/ ,但没有问题,但我想通过HTTPS https://dc-619670cb94e6.vtxfactory.org:4100/提供服务,在此我收到错误ERR_CONNECTION_CLOSED

If I use the port I'm unable to reach it with https, but https://dc-619670cb94e6.vtxfactory.org/ is accessible. 如果使用该端口,则无法通过https访问该端口,但是可以访问https://dc-619670cb94e6.vtxfactory.org/

How can I serve the port 4100 through htttps? 如何通过htttps服务端口4100?

Thanks. 谢谢。

This is an implementation detail of OS.js. 这是OS.js的实现细节。 Their docs recommend setting up a reverse proxy for servers. 他们的文档建议为服务器设置反向代理。 Doing this will give you more control over SSL and ports, like you want 这样做可以让您更好地控制SSL和端口

https://manual.os-js.org/installation/ https://manual.os-js.org/installation/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM