0
votes

I am configuring ssl self signed certificate on tomcat server using centos on amazon ec2 platform and facing some issues. I step by step follow the following tutorial.

http://tecadmin.net/configure-ssl-certificate-in-tomcat/#

but when open my url https://ec2-52-57-105-24.eu-central-1.compute.amazonaws.com:8443/ it says "The site cannot be reached" where as the https://ec2-52-57-105-24.eu-central-1.compute.amazonaws.com/ without 8443 port works fine. Can anybody please tell me what is basically the issue with the tomcat 8443 port. In my server.xml I am using the following configuration.

<Connector port="8443" protocol="HTTP/1.1"
                connectionTimeout="20000"
                redirectPort="8443"
                SSLEnabled="true"
                scheme="https"
                secure="true"
                sslProtocol="TLS"
                keystoreFile="/etc/pki/keystore"
                keystorePass="_password_" />

Any help would be highly appreciated. Thanks.

1

1 Answers

0
votes

Ideally its perfect to access without port (443) for HTTPS. But still if you want access the URL with port number, you can make your URL re-direct from 443 to 8443, you can make use of IPTABLES and make it work it.

sudo /sbin/iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443

sudo /sbin/iptables save