What is the use of port 8443?

22,206

Port 8443 in Apache Tomcat is used for running your service at HTTPS, it requires parameters to be specified as mentioned below.

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
        maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
        clientAuth="false" sslProtocol="TLS" />

The above code enables SSL on port 8443, the default port for HTTPS is 443, so to avoid conflicts it uses 8443 instead of 443 just like 8080 for HTTP instead of 80.

Although you have to generate a keystore for SSL connection to work and require some additional attributes i.e keystoreFile and keystorePass.

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
            maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
            clientAuth="false" sslProtocol="TLS" keystoreFile="/Users/Shared/crunchify.keystore" keystorePass="123456"/>

You can generate keystore by executing below command:

keytool -certreq -keyalg RSA -alias crunchify -file crunchify.csr -keystore crunchify.keystore

Now restart your tomcat and browse your service with 8443.

Share:
22,206
John Worthley
Author by

John Worthley

Updated on May 13, 2020

Comments

  • John Worthley
    John Worthley almost 4 years

    Tomcat uses to open SSL text service. The default configuration file used in the port is 8443. The Tomcat is a core project in the Jakarta project of the Apache Software Foundation, which is developed by Apache, Sun and several other companies and individuals.

    This description does not give an intuitive description nor explain why the port is required.