Apache tomcat9 SSL redirect broken, SSL not working

Viewed 458

I have a legacy application that I have no idea what's inside. The app is running on a windows 10 server under http protocol. I need to make it work with https using the keytool and certificates. On this server an API is running such that I dont need a domain name for it. So I want to make the ssl connection without a domain name using the ip address. I am running apache tomcat 9.0.36 with the following server.xml configuration. And ports : 12001, 12002, 8433, 433, 80, 8000, 8080 are open for testing purposes.

 <Connector port="12001" protocol="HTTP/1.1"
          connectionTimeout="20000"
          redirectPort="8443" URIEncoding="UTF-8" maxThreads="1000" acceptCount="1000" minSpareThreads="50"/>  

    <!-- A "Connector" using the shared thread pool -->
    
     <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" /> 

     <Connector port="8443" protocol="HTTP/1.1"
          maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
          keystoreFile="D:\apache-tomcat-9.0.36\conf\keystore.jks"
          keystorePass="********"
          clientAuth="false" acceptCount="100"
          />

Ran the following command to generate the SSL certificate.

keytool -genkey -keyalg RSA -alias tomcat -keystore keystore.jks -validity 365 -keysize 2048

Checked the certificate (ok) keytool -list -v -keystore keystore.jks

When I go to the https://ip:8433, I cannot connect to the server this site cannot be reached ERR_CONNECTION_RESET When I go to http://ip:12001, there is no redirect and ERR_CONNECTION_RESET

0 Answers
Related