如何通过一个端口为Jetty提供https和http [英] How do I serve https and http for Jetty by one port
本文介绍了如何通过一个端口为Jetty提供https和http的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要做的是为我的jetty应用程序同时提供http和https。我有SelectChannelConnector和SslSocketConnector连接器,它们的端口分别是3131和8443.
What I want to do is serving http and https at the same time for my jetty application. I have SelectChannelConnector and SslSocketConnector connectors and their ports are 3131 and 8443 respectively.
我想透明地转发请求
http://localhost:80/* --> http://localhost:3131/*
https://localhost:80/* --> https://localhost:8443/*
最简单的方法是什么?
感谢
推荐答案
Vortico建议,和443为https。它解决了我的问题。
As Vortico suggested, I changed my ports to 80 for http and 443 for https. It solved my problem.
这篇关于如何通过一个端口为Jetty提供https和http的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文