Administração do sistema
Como configurar o Tomcat para usar HTTPS?
RT.FAQ-32384
Primeiro é necessário ter criar um keystore Java:
Windows:
cd %JAVA_HOME%/bin
Linux:
cd $JAVA_HOME/bin
Criar a chave
keytool -genkey -alias tomcat -keyalg RSA
Responder as perguntas:
Enter keystore password: password
Re-enter new password: password
What is your first and last name?
[Unknown]: Loiane Groner
What is the name of your organizational unit?
[Unknown]: home
What is the name of your organization?
[Unknown]: home
What is the name of your City or Locality?
[Unknown]: Sao Paulo
What is the name of your State or Province?
[Unknown]: SP
What is the two-letter country code for this unit?
[Unknown]: BR
Is CN=Loiane Groner, OU=home, O=home, L=Sao Paulo, ST=SP, C=BR correct?
[no]: yes
Enter key password for
(RETURN if same as keystore password): password
Re-enter new password: password
O arquivo .keystore será criado no seu diretório home.
Depois, editar o arquivo server.xml, localizar o trecho abaixo:
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
e substituir por:
<Connector SSLEnabled="true" acceptCount="100" clientAuth="false"
disableUploadTimeout="true" enableLookups="false" maxThreads="25"
port="8443" keystoreFile="c:\Users\tomcat\.keystore" keystorePass="senha"
protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https"
secure="true" sslProtocol="TLS" />
Agora é só reiniciar o tomcat e acessar
https://host:8443/ELIGO/...