How do I serve https and http for Jetty by one por

2019-07-07 02:36发布

问题:

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.

I would like to transparently forward requests

http://localhost:80/* --> http://localhost:3131/*
https://localhost:80/* --> https://localhost:8443/*

What is the easiest way to make it?

Thanks

回答1:

As Vortico suggested, I changed my ports to 80 for http and 443 for https. It solved my problem.