[英]Cloudfront distribution does not work with for an EC2 instance
I'm using an EC2 instance (AWS) to run my server.我正在使用 EC2 实例 (AWS) 来运行我的服务器。 I've been testing out a few things and want my website and server domains to be HTTPS for a cookie related issue.
我一直在测试一些东西,并希望我的网站和服务器域为 HTTPS 以解决 cookie 相关问题。 I was able to add my website (hosted on S3 as of now) on cloudfront to get a secure domain.
我能够在云端添加我的网站(目前托管在 S3 上)以获得安全域。 I tried to do the same with my server URL.
我尝试对我的服务器 URL 做同样的事情。 However My server is not working on the new Cloudfront URL.
但是,我的服务器无法在新的 Cloudfront URL 上运行。 I have my webapp on Cloudfront and It's working completely fine on the new generated cloudfront URL.
我在 Cloudfront 上有我的 webapp,它在新生成的 cloudfront URL 上运行良好。
Details:细节:
Questions问题
References参考
So I try to access it by d7xxxxxxxxx.cloudfront.net:3001 (server is running on port 3001)
所以我尝试通过 d7xxxxxxxxx.cloudfront.net:3001 访问它(服务器在端口 3001 上运行)
You would only access the CloudFront distribution at ports 80
and 443
.您只能在端口
80
和443
访问 CloudFront 分配。 CloudFront doesn't mirror the ports of the origin server, it only serves the default ports for HTTP and HTTPS. CloudFront 不镜像源服务器的端口,它只为 HTTP 和 HTTPS 提供默认端口。 You would configure port 3001 in your origin settings within CloudFront as the origin HTTP port.
您可以在 CloudFront 的源设置中将端口 3001 配置为源 HTTP 端口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.