简体   繁体   English

运行Tomcat7 for https

[英]Running Tomcat7 for https

When I changed https for secure connection in server.xml of tomcat 7.0 当我在tomcat 7.0的server.xml中更改https以进行安全连接时

<Connector 
  clientAuth="false" port="8443" minSpareThreads="5" maxSpareThreads="75"
  enableLookups="true" disableUploadTimeout="true"
  acceptCount="100" maxThreads="200"
  scheme="https" secure="true" SSLEnabled="true"
  SSLCertificateFile="test.cer"
  SSLCertificateKeyFile="test.key" 
  SSLCACertificateFile="CertPath.txt"
  SSLVerifyClient="require" SSLEngine="on" SSLVerifyDepth="2" sslProtocol="TLS"
/>

I've an error when running tomcat from IDE 从IDE运行tomcat时出错

Caused by: java.io.FileNotFoundException: C:\\Documents and Settings\\User.keystore (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) 引起:java.io.FileNotFoundException:C:\\ Documents and Settings \\ User.keystore(系统找不到指定的文件)java.io.FileInputStream.open(Native Method)

but there is no error by running tomcat 7.0/bin/tomcat7.exe. 但运行tomcat 7.0 / bin / tomcat7.exe没有错误。

What wrong in these two? 这两个有什么不对? Please explain me! 请解释一下! Thanks. 谢谢。

I think you need a .key-store file. 我认为你需要一个.key-store文件。

<Connector port=”443” maxHttpHeaderSize=”8192″
         maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
         enableLookups=”false” disableUploadTimeout=”true”
         acceptCount=”100″ scheme=”https” secure=”true”
         **keystoreFile=”/home/Raja/Desktop/Tomcat5/mycert.jks”**
         clientAuth=”false” sslProtocol=”TLS>

check your server.xml file and also refer this link might be useful to you. 检查您的server.xml文件,并参考此链接可能对您有用。

I think you need to create a new key store file and that you can generate by executing this command. 我认为您需要创建一个新的密钥库文件,并且可以通过执行此命令来生成。

%JAVA_HOME%\\bin>keytool.exe -genkey -alias tomcat -keyalg RSA %JAVA_HOME%\\ bin> keytool.exe -genkey -alias tomcat -keyalg RSA

and for more clarity see this link Tomcat SSL problems . 为了更清晰,请参阅此链接Tomcat SSL问题 I think this can help you to have better understanding of your problem. 我认为这可以帮助您更好地了解您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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