<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SSL证书相关文章列表 | 皇家元林</title>
	<atom:link href="https://hjyl.org/tags/ssl%E8%AF%81%E4%B9%A6/feed/" rel="self" type="application/rss+xml" />
	<link>https://hjyl.org</link>
	<description>刘元林的个人博客</description>
	<lastBuildDate>Mon, 04 Nov 2024 16:17:33 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://img.hjyl.org/uploads/2019/10/cropped-about-me-32x32.png</url>
	<title>SSL证书相关文章列表 | 皇家元林</title>
	<link>https://hjyl.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>自动SSL证书续签工具——Certimate</title>
		<link>https://hjyl.org/auto-ssl-renew-certimate/</link>
					<comments>https://hjyl.org/auto-ssl-renew-certimate/#comments</comments>
		
		<dc:creator><![CDATA[皇家元林]]></dc:creator>
		<pubDate>Mon, 04 Nov 2024 16:17:31 +0000</pubDate>
				<category><![CDATA[元林手札]]></category>
		<category><![CDATA[certimate]]></category>
		<category><![CDATA[httpsok]]></category>
		<category><![CDATA[SSL证书]]></category>
		<guid isPermaLink="false">https://hjyl.org/?p=5441</guid>

					<description><![CDATA[Certimate是基于go语言编写的私有部署的SSL证书申请与续签工具。选择它，是因为它够简单，部署很简单。 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><a href="https://hjyl.org/go/aHR0cHM6Ly9kb2NzLmNlcnRpbWF0ZS5tZS8=" rel="nofollow" target="_blank">Certimate</a>是基于go语言编写的私有部署的SSL证书申请与续签工具。选择它，是因为它够简单，部署很简单。网上自动续签SSL证书的工具很多，但感觉很复杂。有的是sh命令，有的是需要搭建nodejs环境、Python环境等。go语言编写的工具直接运行就能用。多方便呀！</p>



<p>自从SSL证书从一年期限降到三个月，这时间过得可真快。所以不得不找一款称心如意的自动SSL证书签发工具。之前用httpsok，一开始感觉很不错的，有5个免费域名的额度，但后来我才发现，只有5个额度，而不是5个域名SSL证书的额度，现在还降到3个额度了，几个域名用一次就没额度了。看来想用这个工具还得花钱。对于我这个白嫖党来说，这已然不适合我了。</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1199" height="555" data-id="5443" src="https://img.hjyl.org/uploads/2024/11/20241104235431.jpg"  class="wp-image-5443" title="20241104235431.jpg" alt="20241104235431.jpg" /><figcaption class="wp-element-caption">httpsok的订阅价格</figcaption></figure>



<figure class="wp-block-image size-large"><img decoding="async" width="1628" height="452" data-id="5442" src="https://img.hjyl.org/uploads/2024/11/20241104235345.jpg"  class="wp-image-5442" srcset="https://img.hjyl.org/uploads/2024/11/20241104235345.jpg 1628w, https://img.hjyl.org/uploads/2024/11/20241104235345-1536x426.jpg 1536w" sizes="(max-width: 1628px) 100vw, 1628px" title="20241104235345.jpg" alt="20241104235345.jpg" /><figcaption class="wp-element-caption">httpsok的控制台</figcaption></figure>
</figure>



<p>所以找到了Certimate，它和httpsok很像，不知道谁模仿了谁，还是碰巧了。但不得不说，能制作这个工具且愿意开源此工具的人，绝对是个天才。</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1628" height="359" src="https://img.hjyl.org/uploads/2024/11/20241104235620.jpg"  class="wp-image-5444" srcset="https://img.hjyl.org/uploads/2024/11/20241104235620.jpg 1628w, https://img.hjyl.org/uploads/2024/11/20241104235620-1536x339.jpg 1536w" sizes="(max-width: 1628px) 100vw, 1628px" title="20241104235620.jpg" alt="20241104235620.jpg" /><figcaption class="wp-element-caption">Certimate的控制台</figcaption></figure>



<p>httpsok卸载（<a href="https://hjyl.org/go/aHR0cHM6Ly9naXRodWIuY29tL2h0dHBzb2svaHR0cHNvaw==" rel="nofollow" target="_blank">httpsok.sh</a>）：</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash line-numbers">httpsok.sh -u</code></pre>



<p>开始Certimate（<a href="https://hjyl.org/go/aHR0cHM6Ly9kb2NzLmNlcnRpbWF0ZS5tZS9kb2NzL2ludHJv" rel="nofollow" target="_blank">文档</a>）：</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash line-numbers">./certimate serve</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="654" height="523" src="https://img.hjyl.org/uploads/2024/11/20241105000250.jpg"  class="wp-image-5445" title="20241105000250.jpg" alt="20241105000250.jpg" /></figure>



<p>它支持Let's Encrypt，ZeroSSL，Google Trust Services三个CA证书。</p>



<p>具体操作方法官方都有文档，就不细说了。</p>
<div id="content-copyright"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;font-size: 13px;">版权声明: </span><span style="font-size: 13px;">本文采用 <a href="https://hjyl.org/go/aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzMuMC8=" rel="nofollow" target="_blank">BY-NC-SA</a> 协议进行授权，如无注明均为原创，转载请注明转自 <a href="https://hjyl.org">皇家元林</a><br>本文链接: <a rel="bookmark" title="自动SSL证书续签工具——Certimate" href="https://hjyl.org/auto-ssl-renew-certimate/">自动SSL证书续签工具——Certimate</a></span></div>]]></content:encoded>
					
					<wfw:commentRss>https://hjyl.org/auto-ssl-renew-certimate/feed/</wfw:commentRss>
			<slash:comments>20</slash:comments>
		
		
			</item>
		<item>
		<title>换泛域名SSL证书</title>
		<link>https://hjyl.org/wildcard-ssl-certificates/</link>
					<comments>https://hjyl.org/wildcard-ssl-certificates/#comments</comments>
		
		<dc:creator><![CDATA[皇家元林]]></dc:creator>
		<pubDate>Tue, 31 Oct 2023 09:14:42 +0000</pubDate>
				<category><![CDATA[元林手札]]></category>
		<category><![CDATA[Let&#039;s Encrypt]]></category>
		<category><![CDATA[SSL证书]]></category>
		<category><![CDATA[泛域名]]></category>
		<category><![CDATA[通配符证书]]></category>
		<guid isPermaLink="false">https://hjyl.org/?p=4718</guid>

					<description><![CDATA[之前一直用腾讯云免费的单一域名SSL证书，现在二级域名用的多了，一一申请太麻烦了，于是就想试试泛域名SSL证书 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>之前一直用腾讯云免费的单一域名SSL证书，现在二级域名用的多了，一一申请太麻烦了，于是就想试试泛域名SSL证书，也叫通配符证书。百度一下，就找到一个网站叫来此加密，可以申请Let's Encrypt通配符证书，因为这个网站，我才知道Let's Encrypt叫“来此加密”，挺有意思的，我也是第一次用这家SSL证书。只是有个缺点，通配符SSL证书只有三个月的效期，单一域名SSL证书效期有一年。有人说通配符证书安全风险会大些，如果被入侵，其下二级域名都有可能遭殃，没这么巧吧？！</p>
<div id="content-copyright"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;font-size: 13px;">版权声明: </span><span style="font-size: 13px;">本文采用 <a href="https://hjyl.org/go/aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzMuMC8=" rel="nofollow" target="_blank">BY-NC-SA</a> 协议进行授权，如无注明均为原创，转载请注明转自 <a href="https://hjyl.org">皇家元林</a><br>本文链接: <a rel="bookmark" title="换泛域名SSL证书" href="https://hjyl.org/wildcard-ssl-certificates/">换泛域名SSL证书</a></span></div>]]></content:encoded>
					
					<wfw:commentRss>https://hjyl.org/wildcard-ssl-certificates/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
			</item>
		<item>
		<title>世界，你好！</title>
		<link>https://hjyl.org/hello-world/</link>
					<comments>https://hjyl.org/hello-world/#comments</comments>
		
		<dc:creator><![CDATA[皇家元林]]></dc:creator>
		<pubDate>Wed, 19 Aug 2015 03:35:05 +0000</pubDate>
				<category><![CDATA[生活点滴]]></category>
		<category><![CDATA[LNMP]]></category>
		<category><![CDATA[SSL证书]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[阿里云]]></category>
		<guid isPermaLink="false">https://hjyl.org/?p=1</guid>

					<description><![CDATA[重装服务器和lnmp，WordPress，SSL证书，从WordPress4.3开始！]]></description>
										<content:encoded><![CDATA[
<p>欢迎使用WordPress。这是系统自动生成的演示文章。编辑或者删除它，然后开始您的博客！</p>



<p>----------------------------华丽的分割线--------------------------------------<br>这个题目很好，我就不新建文章了。又好久没更新我的blog了，昨天才发现后台登不了，错误提示：无效用户。无论我怎么修改数据库都无补于事。所以只得重装WordPress。</p>



<p>接着我又发现lnmp1.2更新很久了，于是我又按捺不住重装了阿里云。一切都在我的睡梦中完成。。。</p>



<p>早上起来，继续安装每个站点——hjyl.org，hilau.com和iyl.me。但过程中遇到的麻烦是我从未见过的。以前搬家都是用phpmyadmin备份恢复即可轻松搞定，但现在只有hilau.com是这样的情况。而其余两个我只能用WordPress自带的导出导入工具转移。接着我又发现一个亮点，WordPress的数据库排序规则也变了，以前是utf8_general_ci，而现在utf8mb4_unicode_ci，不过有点插件貌似没更新，比如百度sitemap，还是保留以前的规则。对于我这个升级控来说，喜欢尝试新的，不一样的，觉得更高大上了，但是到底哪个好，我就是一个白痴。</p>



<p>后来因为我的SSL证书丢失，找回耽搁了很久。可以说这次不知何种原因导致的崩溃整整折腾了一天。现在又可以愉快的玩耍了。</p>



<p>自从恋上lol，不，只能说是发泄，或懒于做其他事为借口罢了，各种更新让我应接不暇。WordPress也更新到4.3了，虽然中文版还在4.2.2，各种函数都更新了，所以我刚审核通过的主题，也需要在短时间内更新了，虽然不更新也不影响使用。看看我以前做的主题，虽然多，但从未更新过，也不知道还能不能用。都已成为历史，留着纪念吧！安装包都不知道哪儿去了。。。</p>



<p>本次一系列的重装和更新算是另一个开始！所以。。世界，你好！</p>
<div id="content-copyright"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;font-size: 13px;">版权声明: </span><span style="font-size: 13px;">本文采用 <a href="https://hjyl.org/go/aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzMuMC8=" rel="nofollow" target="_blank">BY-NC-SA</a> 协议进行授权，如无注明均为原创，转载请注明转自 <a href="https://hjyl.org">皇家元林</a><br>本文链接: <a rel="bookmark" title="世界，你好！" href="https://hjyl.org/hello-world/">世界，你好！</a></span></div>]]></content:encoded>
					
					<wfw:commentRss>https://hjyl.org/hello-world/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
			</item>
		<item>
		<title>再次启用HTTPS</title>
		<link>https://hjyl.org/http-to-https/</link>
					<comments>https://hjyl.org/http-to-https/#comments</comments>
		
		<dc:creator><![CDATA[皇家元林]]></dc:creator>
		<pubDate>Mon, 09 Feb 2015 14:32:09 +0000</pubDate>
				<category><![CDATA[生活点滴]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[SSL证书]]></category>
		<category><![CDATA[免费SSL证书]]></category>
		<guid isPermaLink="false">https://hjyl.org/?p=3002</guid>

					<description><![CDATA[利用wosign免费的SSL证书，给皇家元林博客加密，继续启用https链接。]]></description>
										<content:encoded><![CDATA[<p>好纠结，我这个人好像有强迫症，一直很喜欢带https的链接，特别是在浏览器打开的时候，链接前面有一把锁，还有绿色的标志，特别好看。只不过SSL证书是非常昂贵的，比VPS还贵。所以只能将就免费的SSL证书来满足自我的虚荣心了。</p>
<p>在13年的<a href="https://hjyl.org/add-s-to-http/" title="给http加上s" target="_blank">给http加上s</a>那篇文章里记录了我当时用startSSL证书给皇家元林博客加了密。但是很快，过不了两个月，我的博客就被墙了。后来传说startssl的证书很容易导致博客被墙，所以再也不敢用startssl。</p>
<p>这两天没事逛博客，并逐渐寻回我当年对博客，服务器，主题，代码的记忆，也渐渐燃烧起折腾的激情。突然看到国内这家wosign推出免费的SSL证书，传说也还不错，当然就迫不及待的申请了。之前的笔录没算白费，把申请好的证书上传到服务器，简单修改下，OK！</p>
<p>其实我也想高PR，高alexa排名，高评论，但是即便是高了，也觉得没有太多意义。所以想怎么折腾就怎么折腾，直接从http切换到了https。像传说中一系列SEO大法，我也不在乎了。而在我不断的折腾里，还能有几个人记得我的博客，赏心悦目之余，好心情之际留个脚印，互动一下，我就感觉整个世界都美好了一点。</p>
<p>由于经验尚浅，不知道我这加了密之后，对我的博客程序，主题，样式，JQ等效果可有负面影响？尤其不希望因为SSL证书再被墙了，不过我这已经在国内了，还能怎么墙呢？哼哼哼。。。呵呵呵。。。哈哈哈。。。。</p>
<div id="content-copyright"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;font-size: 13px;">版权声明: </span><span style="font-size: 13px;">本文采用 <a href="https://hjyl.org/go/aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzMuMC8=" rel="nofollow" target="_blank">BY-NC-SA</a> 协议进行授权，如无注明均为原创，转载请注明转自 <a href="https://hjyl.org">皇家元林</a><br />本文链接: <a rel="bookmark" title="再次启用HTTPS" href="https://hjyl.org/http-to-https/">再次启用HTTPS</a></span></div>
]]></content:encoded>
					
					<wfw:commentRss>https://hjyl.org/http-to-https/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title>HTTPS以后</title>
		<link>https://hjyl.org/after-https/</link>
					<comments>https://hjyl.org/after-https/#comments</comments>
		
		<dc:creator><![CDATA[皇家元林]]></dc:creator>
		<pubDate>Mon, 22 Apr 2013 14:43:14 +0000</pubDate>
				<category><![CDATA[元林手札]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[LNMP]]></category>
		<category><![CDATA[SSL证书]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://hjyl.org/?p=2475</guid>

					<description><![CDATA[记录HTTPS之后遇到的一些问题。]]></description>
										<content:encoded><![CDATA[<p>自给<a title="给http加上s" href="http://hjyl.org/add-s-to-http/" target="_blank">HTTP加了s</a>以后，我折腾了很多，终于将它搞定。主要原因是lnmp调用SSL证书的路径和证书本身的问题。不过都已解决，并且记录在那篇文章的后面。</p>
<p>虽然现在不是很完美，但是看到一把“锁”的感觉还是很舒服的。所以我决定将全站都改成https的，这就意味着我的PR将从零开始，如果运气好的话，会从http 301到https。但这些也不重要了。</p>
<p>首先从后台--设置--常规，将网站的地址和域名都改成https。</p>
<p>其次从phpmyadmin数据库里，用SQL语言UPDATE 表名 SET 字段 = REPLACE(字段,'待替换内容','替换值')修改链接。不过有个缺陷，这应该是WordPress程序的问题，那就是评论中，作者的链接还是http形式。</p>
<p>最后还有个很严重的问题，我的图床站点img.hjyl.org，为了节省流量，我加了防盗链。不过我改成https之后，我这个站点显示的却是防盗链的图片。经过明查暗访，终于找到答案：</p>
<p>location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$<br />
{<br />
valid_referers none blocked <span style="color: #ff0000;">server_names</span> hjyl.org *.hjyl.org;<br />
if ($invalid_referer) {<br />
rewrite ^/ http://hjyl.org/wp-content/themes/yOoo/images/logo.gif;<br />
#return 404;<br />
}<br />
expires 30d;<br />
}</p>
<p>关键是红色部分，我猜！然而效果正如我所想。准，买彩票都没这么准！</p>
<p>好了，暂且这么多！</p>
<div id="content-copyright"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;font-size: 13px;">版权声明: </span><span style="font-size: 13px;">本文采用 <a href="https://hjyl.org/go/aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzMuMC8=" rel="nofollow" target="_blank">BY-NC-SA</a> 协议进行授权，如无注明均为原创，转载请注明转自 <a href="https://hjyl.org">皇家元林</a><br />本文链接: <a rel="bookmark" title="HTTPS以后" href="https://hjyl.org/after-https/">HTTPS以后</a></span></div>
]]></content:encoded>
					
					<wfw:commentRss>https://hjyl.org/after-https/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>给http加上s</title>
		<link>https://hjyl.org/add-s-to-http/</link>
					<comments>https://hjyl.org/add-s-to-http/#comments</comments>
		
		<dc:creator><![CDATA[皇家元林]]></dc:creator>
		<pubDate>Sat, 20 Apr 2013 13:18:31 +0000</pubDate>
				<category><![CDATA[生活点滴]]></category>
		<category><![CDATA[443端口]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[LNMP]]></category>
		<category><![CDATA[SSL证书]]></category>
		<category><![CDATA[StartSSL]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[免费SSL证书]]></category>
		<category><![CDATA[网站加密]]></category>
		<guid isPermaLink="false">http://hjyl.org/?p=2461</guid>

					<description><![CDATA[申请StartSSL免费的SSL证书，并记录在lnmp+debian下的具体用法。]]></description>
										<content:encoded><![CDATA[<p>记得刚毕业，在无锡工作的时候，发现这个国度还有GFW，从那时起对https特别喜欢，传说这样就不会被GFW和谐了。因此曾一度想尽设法给自己的网站申请SSL证书。但是因为技术和money有限，搁置了。很庆幸，到目前为止，我还是很低调的。</p>
<p>用vps很长一段时间了，昨晚突然兴起，添加个https玩玩。大家可以通过<a title="皇家元林" href="http://hjyl.org" target="_blank">http://hjyl.org</a>访问本博客。有啥好处呢？不知道。因为这个是StartSSL免费的SSL证书，可能有局限性，不像<a href="https://hjyl.org/go/aHR0cHM6Ly93d3cuYWxpcGF5LmNvbS8=" rel="nofollow" target="_blank">https://www.alipay.com/</a>那样真正实现完全加密，而且在浏览器上有个锁的标识，非常有个性，看图，godaddy的更明显。</p>
<p><a href="https://img.hjyl.org/uploads/2013/04/alipay.png"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-2462" alt="alipay" src="https://img.hjyl.org/uploads/2013/04/alipay-300x197.png" width="300" height="197" title="alipay 300x197.png" /></a> <a href="https://img.hjyl.org/uploads/2013/04/godaddy.png"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-2463" alt="godaddy" src="https://img.hjyl.org/uploads/2013/04/godaddy-300x219.png" width="300" height="219" title="godaddy 300x219.png" /></a></p>
<p>查了很多信息，网上关于StartSSL免费SSL证书的申请和续期教程很多。这里只记录下在lnmp+debian下的具体用法吧。</p>
<p><del>把ssl.key和ssl.crt放在/usr/local/nginx/conf/vhost下</del>（这个路径问题见下面更新），然后修改你的域名.conf，即nginx配置，主要是添加一个server，和默认的server差不多，不同的是端口，我才发现https用的是443端口，就等于说把原来的hjyl.org:80改成hjyl.org:443，只是默认80端口不需要表示出来。</p>
<div class="source" style="font-family: '[object HTMLOptionElement]','Consolas','Lucida Console','Courier New'; color: #000000;">server<br />
{<br />
listen       <span style="color: #0000ff;">80</span>;<br />
server_name hjyl.org www.hjyl.org;<br />
index index.html index.htm index.php <span style="color: #000000;">default</span>.html <span style="color: #000000;">default</span>.htm <span style="color: #000000;">default</span>.php;<br />
root  /home/wwwroot/hjyl.org;include wordpress.conf;<br />
location ~ .*.(php|php5)?$<br />
{<br />
try_files $uri =404;<br />
fastcgi_pass  unix:/tmp/php-cgi.sock;<br />
fastcgi_index index.php;<br />
include fcgi.conf;<br />
}..........<br />
}server<br />
{<br />
listen         <span style="color: #0000ff;">443</span>;<br />
server_name hjyl.org www.hjyl.org;<br />
index index.html index.htm index.php <span style="color: #000000;">default</span>.html <span style="color: #000000;">default</span>.htm <span style="color: #000000;">default</span>.php;<br />
root  /home/wwwroot/hjyl.org;</p>
<p>ssl <span style="color: #000000;">on</span>;<br />
ssl_certificate ssl.crt;       <span style="color: #008800; font-style: italic;">#如果证书和此配置文件不在同一目录，需写上路径，例如/home/wwwroot/ssl.crt</span><br />
ssl_certificate_key ssl.key;   <span style="color: #008800; font-style: italic;">#同上</span><br />
ssl_session_timeout 5m;</p>
<p>ssl_protocols SSLv2 SSLv3 TLSv1;<br />
ssl_ciphers <span style="color: #000000;">ALL</span>:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;<br />
ssl_prefer_server_ciphers   <span style="color: #000000;">on</span>;</p>
<p>include wordpress.conf;<br />
location ~ .*.(php|php5)?$<br />
{<br />
try_files $uri =404;<br />
fastcgi_pass  unix:/tmp/php-cgi.sock;<br />
fastcgi_index index.php;<br />
include fcgi.conf;<br />
fastcgi_param HTTPS <span style="color: #000000;">on</span>;   <span style="color: #008800; font-style: italic;">#添加这个，是为了在https时，点开的链接也https。</span><br />
}</p>
<p>.........<br />
}</p>
</div>
<p>然后/root/lnmp reload，看看效果吧！</p>
<p>测试过IE，chrome，和火狐，就火狐效果好点。chrome好像不支持，郁闷！不管怎样，以前想做没做到的事现在实现了，就这样低调的酷吧！并且继续折腾吧，希望会实现那理想的效果！『如找到更好的技巧，会同时在此页更新的』</p>
<p><span style="color: #ff0000;"><strong>2013/04/22  更新：</strong></span></p>
<p>几经波折，绞尽脑汁，终于弄明白了lnmp下的SSL一些问题。（在此特别感谢<a href="https://hjyl.org/go/aHR0cHM6Ly9yaXZzZW4ucnMtd29yay5tZS8=" rel="nofollow" target="_blank">Rvsien</a>指点）</p>
<p>ssl_certificate ssl.crt;<br />
ssl_certificate_key ssl.key;</p>
<p>此时，它调用的是/usr/local/nginx/conf/下的证书和key，所以这个配置建议还是带上证书和key的路径，例如</p>
<p>ssl_certificate /usr/local/nginx/conf/vhost/ssl.crt;<br />
ssl_certificate_key /usr/local/nginx/conf/vhost/ssl.key;</p>
<p>别小看https的更换，从SEO上讲，是一个新站的开始，等于换了一个域名。所以确认换https时，我们将http 301重定向到https。只需要如此配置：</p>
<p>server<br />
{<br />
listen       80;<br />
server_name hjyl.org www.hjyl.org;<br />
rewrite ^(.*) https://$server_name$1 permanent; #http 301重定向到https规则<br />
........</p>
<p>｝</p>
<p>还有特别说明，如果firefox里地址栏不显示一个锁子的话，可能是页面使用了http的链接，或者使用了http的外网的链接资源导致的，它的意思是：页面部分加密。</p>
<div id="content-copyright"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;font-size: 13px;">版权声明: </span><span style="font-size: 13px;">本文采用 <a href="https://hjyl.org/go/aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzMuMC8=" rel="nofollow" target="_blank">BY-NC-SA</a> 协议进行授权，如无注明均为原创，转载请注明转自 <a href="https://hjyl.org">皇家元林</a><br />本文链接: <a rel="bookmark" title="给http加上s" href="https://hjyl.org/add-s-to-http/">给http加上s</a></span></div>
]]></content:encoded>
					
					<wfw:commentRss>https://hjyl.org/add-s-to-http/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
