惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
IT之家
IT之家
Google DeepMind News
Google DeepMind News
D
Docker
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
月光博客
月光博客
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - See Me Fly

[MVC] Code First中Migration的问题 [MVC]开篇 搭建小型邮件服务器 Visual Studio中添加Service异常 IIS7 IIS8上面运行 ASP 画圆滑的曲线连接地图上面的点 [IIS] 不能加载类型System.ServiceModel.Activation.HttpModule [DICOM] Download ClearCanvas Source Code [DICOM] 开篇 研究SplendidCRM UnauthorizedAccessException trying to delete a file [转]C#WinForm - 立即更新静态文本Label Crystal Report 2011连接SQL Server 2008失败 Xcode: 给项目添加framework DC中用户的同步问题 用VNC连接Mac OS Xcode访问SVN服务器 Window 7访问共享目录问题 Failed to install MSXML6 when installing SQL Server 2005 - See Me Fly
JIRA配置SSL
See Me Fly · 2011-08-16 · via 博客园 - See Me Fly

为了给JIRA配置SSL,折腾了好一会,主要还是源于对Tomcat不太熟悉。

JIRA官方网站上面有一个指南, 上面说的也听详细的。

 Running JIRA over SSL or HTTPS

可是照上面的做完之后,就是访问不了。没有办法htts://localhost:8443/访问,用"netstat -ano"命令查看,发现8443没有运行起来。

后面,打开 日志文件(JIRA\logs\jira110811123613-stderr.2011-08-16.log),里面提示“Setting property 'keystoreFile' to {...} did not find a matching property”。

 文章里面有提到:

Can't find the keystore

java.io.FileNotFoundException: /home/user/.keystore (No such file or directory) 

This indicates that Tomcat cannot find the keystore. The keytool utility creates the keystore as a file called .keystore in the current user's home directory. For Unix/Linux the home directory is likely to be /home/<username>. For Windows it is likely to be C:\Documents And Settings\<UserName>.

Make sure you are running JIRA as the same user who created the keystore. If this is not the case, or if you are running JIRA on Windows as a service, you will need to specify where the keystore file is in conf/server.xml. Add the following attribute to the connector tag you uncommented:

以为我的JIRA就是安装成service的,所以要加上keystoreFile属性。 开始没注意看,把keystoreFile属性改了一通,试试"${user.home}/.keystore",不管用;然后又试试"<JIRA_Installation>/jre/lib/security/cacerts/.."。

keystoreFile="<location of keystore file>"
 

 后面再仔细看错误日志,才发现。JIRA安装service时候,默认的使用”Local System“的账号, ”${user.home}“会被映射成"C:\Documents and Settings\All Users"目录,而当我们创建认证文件时,.keystore是在我们当前登录用户的目录里面。大部分时候是”C:\Documents and Settings\Administrator".

 把conf/server.xml改成如下就可以了:

            <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
              maxHttpHeaderSize="8192" SSLEnabled="true"
              maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
              enableLookups="false" disableUploadTimeout="true"
              acceptCount="100" scheme="https" secure="true"
              keystoreFile="C:/Documents and Settings/Administrator/.keystore" keystorePass="changeit"
              clientAuth="false" sslProtocol="TLS" useBodyEncodingForURI="true"/>