Yazeka
Arama sonuçlarına göre oluşturuldu
Tomcat'te SSL'i aktif etmek için aşağıdaki adımlar izlenmelidir:
- Keystore Oluşturma: SSL sertifikası için bir keystore oluşturmak gereklidir 13. Bu,
keytool
komutu ile yapılabilir:
# keytool -genkey -alias tomcat -keyalg RSA -keystore tomcat.keystore
Bu komut, sertifika için gerekli bilgileri girmenizi isteyecektir 1.
# keytool -certreq -keyalg RSA -alias tomcat -file csr.csr -keystore tomcat.keystore
Bu komut, CSR dosyasını oluşturacak ve sertifika yetkilisinden sertifika talep etmek için kullanılacaktır 1.
- Sertifikaları İçe Aktarma: Oluşturulan sertifikaları keystore'a içe aktarmak gereklidir 12:
- Root Sertifikası:
keytool -import -alias root -keystore tomcat.keystore -trustcacerts -file root.crt
1. - Intermediate Sertifikası:
keytool -import -alias intermediate -keystore tomcat.keystore -trustcacerts -file intermediate.crt
1. - Primary Sertifikası:
keytool -import -trustcacerts -alias tomcat -file PrimaryCertFileName.crt -keystore tomcat.keystore
1. - Tomcat Yapılandırması:
server.xml
dosyasında SSL konfigürasyonu yapılmalıdır 14:
<Connector port="8443" maxThreads="200" scheme="https" secure="true" SSLEnabled="true" keystoreFile="[path to your keystore file]" keystorePass="changeit" clientAuth="false" sslProtocol="TLS"/>
Bu kod, 8443 portunu güvenli hale getirecektir 1.
- Tomcat'i Yeniden Başlatma: Yapılan değişiklikleri etkinleştirmek için Tomcat hizmeti yeniden başlatılmalıdır 1.
5 kaynaktan alınan bilgiyle göre: