IP adresses and DNS records don’t affect port numbers. You’ll need to run your server at port 80 instead or (most often better) redirect traffic coming to port 80 to 8080. See e.g.
this excellent Jetty wiki page (most of the stuff is server agnostic).
I use iptables style solution on the servers I administrate. Just be sure to save the rule so your server survives from a reboot.
I’m now entering to my app via
https, which I understand is port 443…do I redirect it in the same way? If I do that then it will be
http and not
https right?
I currently have this in tomcat’s server.xml:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
and I should also include:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keyAlias="server"
keystoreFile="/home/user/www_myDomain_com.jks"
keystorePass="password" />
But this is not working
Thank you very much Matti…
I managed to use
https perfectly , but for some reason when I use
http (or nothing, just www.myDomain.com), I get a download prompt window withan empty file, and my page gets nowhere, instead of redirecting to
https .
I don’t about your specific setup, but we set the 8080 connector to redirect to port 443 as that’s the standard for HTTPS. We then let iptables NAT redirect 80 to 8080 and 443 to 8443:
Be sure your app’s web.xml includes a security constraint confidential if you’d like HTTP to auto-redirect to HTTPS, something like:
Entire Open eSignForms web app
/*
CONFIDENTIAL
Also, not sure about your SSL, but the key alias defaults to “tomcat” but I presume that keyAlias works if that’s how you set things up and you said https is working for you.