祝大家度过愉快的一天。
我生成了一个自签名的KeyStore文件,并使用下面的代码将其添加到Tomcat中
<Connector port=”8443″
maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
enableLookups=”true” disableUploadTimeout=”true”
acceptCount=”100″ debug=”0″ scheme=”https” secure=”true”
clientAuth=”false” sslProtocol=”TLS”
keystoreFile=”/webapps/techtracer.bin”
keystorePass=”ttadmin” />实际上,我访问在Tomcat中运行的应用程序的链接是使用以下链接
http:localhost:8080/SpringEx/index.html 但是ssl证书只有在我这样做的情况下才能工作
http:localhost:8443/SpringEx/index.html 这种行为正常吗?
谢谢你。
发布于 2011-10-17 14:56:22
是的,这很正常。但是,如果您想使用更友好的链接访问,如https://localhost/SpringEx/index.html,请尝试以下链接:
您的server.xml中可能有另一个连接器
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />尝试将redirectPort设置为443,然后在连接器中也使用443作为端口。
<Connector port=”443″
maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
enableLookups=”true” disableUploadTimeout=”true”
acceptCount=”100″ debug=”0″ scheme=”https” secure=”true”
clientAuth=”false” sslProtocol=”TLS”
keystoreFile=”/webapps/techtracer.bin”
keystorePass=”ttadmin” />现在您应该可以在https://localhost/SpringEx/index.html上访问您的服务了
https://stackoverflow.com/questions/7790101
复制相似问题