简体   繁体   中英

Unable to configure https on amazon ec2 (centos) tomcat

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM