简体   繁体   English

如何在 Next JS 部署中使用 SSL 证书?

[英]How can I use an SSL certificate with my Next JS deployment?

I have a Next.js deployment on an EC2 instance.我在 EC2 实例上部署了 Next.js。 I want to install an SSL certificate.我想安装一个 SSL 证书。 The only way I can think of is to use a custom server config, but this seems to remove certain optimizations that I'd rather keep.我能想到的唯一方法是使用自定义服务器配置,但这似乎删除了我宁愿保留的某些优化。 Keep in mind I am starting the server using 'next start'.请记住,我正在使用“下一个启动”启动服务器。

The solutions I found online only apply to local deployments and they also involve using a custom server config.我在网上找到的解决方案仅适用于本地部署,它们还涉及使用自定义服务器配置。

Thanks谢谢

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

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