`
mzh_2008beijing
  • 浏览: 230239 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

基于Tomcat 的SSL证书配置步骤

阅读更多
步骤一:生成证书:
   (参见http://mazhihui.iteye.com/blog/1012912);

步骤二:配置Tomcat:
   找到%TOMCAT_HOME%/conf/server.xml,配置代码:
  
   <Connector SSLEnabled="true" 
			   clientAuth="false" 
			   keystoreFile="D:/SSL/server/tomcat.keystore" 
			   keystorePass="pdepde" 
			   maxThreads="150" 
			   port="8443" 
			   protocol="HTTP/1.1" 
			   scheme="https" 
			   secure="true" 
			   sslProtocol="TLS" 
			   truststoreFile="D:/SSL/server/tomcat.keystore" 
			   truststorePass="pdepde"/>    


步骤三:配置Web应用:
   找到Web应用下的WEB-INF/web.xml,在<welcome-file-list>之后添加配置代码:
     
  <security-constraint>
		<web-resource-collection>
			<web-resource-name>shouye</web-resource-name>
			<url-pattern>/demo.jsp</url-pattern>
		</web-resource-collection>
		<user-data-constraint>
			<transport-guarantee>CONFIDENTIAL</transport-guarantee>
		</user-data-constraint>
	</security-constraint>   

   (关于<security-constraint>

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics