idea将tomcat插件配置成https访问(linux)
·
参考:https://blog.csdn.net/gane_cheng/article/details/53001846 配置本地tomcat
https://blog.csdn.net/ariesandx/article/details/82193106 配置idea中的插件tomcat
1.执行命令:keytool -genkeypair -alias "tomcat" -keyalg "RSA" -keystore "D:\tomcat.keystore"
D:\tomcat.keystore是生成文件的存放地址
2.在idea插件中新增tomcat配置项
<httpsPort>8443</httpsPort> <keystoreFile>/Users/cisdi/Downloads/apache-tomcat-7.0.96/tomcat.keystore</keystoreFile> <keystorePass>123456</keystorePass>
最终效果
<!-- tomcat插件控制 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<path>/</path>
<uriEncoding>UTF-8</uriEncoding>
<finalName>mgr</finalName>
<server>tomcat7</server>
<httpsPort>8443</httpsPort>
<keystoreFile>/Users/cisdi/Downloads/apache-tomcat-7.0.96/tomcat.keystore</keystoreFile>
<keystorePass>123456</keystorePass>
<port>8081</port>
</configuration>
</plugin>
3.启动即可
二、本地tomcat配置成https访问
在上面第1步完成的基础上,修改server.xml文件的
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="E:/tomcat.keystore" keystorePass="123456" />
更多推荐
所有评论(0)