[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] How do I serve https and http by one port
|
You cannot listen to the same port for both HTTP and HTTPS connections,
you should sperate them, the default port for HTTPS is 443.
I don't know the Jetty way, but you can achieve desired effect using a reverse proxy (eg. nginx) in front of Jetty.
There is an example configuration for nginx here:
http://wiki.nginx.org/JavaServers#Configure_the_extensions_and_the_servlet_path_to_be_processed_by_the_Java_server
Another possible solution is to use port forwarding. If you are on
Unix-like operating system you can forward ports by using built-in
firewall (There should be similar tools for Windows). On Linux you can
do this with iptables:
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3131
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443
Here, eth0 is your public interface.
Hope this helps,
Emre.