<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans">
	<id>https://wiki.fangc.top/index.php?action=history&amp;feed=atom&amp;title=%E4%B8%BA%E7%BD%91%E7%AB%99%E9%85%8D%E7%BD%AEssl%E8%AF%81%E4%B9%A6</id>
	<title>为网站配置ssl证书 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.fangc.top/index.php?action=history&amp;feed=atom&amp;title=%E4%B8%BA%E7%BD%91%E7%AB%99%E9%85%8D%E7%BD%AEssl%E8%AF%81%E4%B9%A6"/>
	<link rel="alternate" type="text/html" href="https://wiki.fangc.top/index.php?title=%E4%B8%BA%E7%BD%91%E7%AB%99%E9%85%8D%E7%BD%AEssl%E8%AF%81%E4%B9%A6&amp;action=history"/>
	<updated>2026-04-19T16:22:45Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.fangc.top/index.php?title=%E4%B8%BA%E7%BD%91%E7%AB%99%E9%85%8D%E7%BD%AEssl%E8%AF%81%E4%B9%A6&amp;diff=1830&amp;oldid=prev</id>
		<title>2024年2月20日 (二) 09:04 FC</title>
		<link rel="alternate" type="text/html" href="https://wiki.fangc.top/index.php?title=%E4%B8%BA%E7%BD%91%E7%AB%99%E9%85%8D%E7%BD%AEssl%E8%AF%81%E4%B9%A6&amp;diff=1830&amp;oldid=prev"/>
		<updated>2024-02-20T09:04:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 手动获取 ==&lt;br /&gt;
&lt;br /&gt;
=== apache2 ===&lt;br /&gt;
新建一个文件夹用于存放证书文件&lt;br /&gt;
&lt;br /&gt;
到阿里云或者其他什么地方注册一个证书绑定相应的域名审核完成后下载到本地&lt;br /&gt;
&lt;br /&gt;
复制到新建的用于存放证书的文件夹中&lt;br /&gt;
&lt;br /&gt;
修改apache443端口的配置文件，插入下面内容，第一行开启ssl，后面三行指定ssl秘钥证书&amp;lt;syntaxhighlight lang=&amp;quot;linux-config&amp;quot;&amp;gt;&lt;br /&gt;
                SSLEngine on&lt;br /&gt;
                #   A self-signed (snakeoil) certificate can be created by inst&amp;gt;&lt;br /&gt;
                #   the ssl-cert package. See&lt;br /&gt;
                #   /usr/share/doc/apache2/README.Debian.gz for more info.&lt;br /&gt;
                #   If both key and certificate are stored in the same file, on&amp;gt;&lt;br /&gt;
                #   SSLCertificateFile directive is needed.&lt;br /&gt;
                SSLCertificateFile      /etc/apache2/ssl/public.crt&lt;br /&gt;
                SSLCertificateKeyFile /etc/apache2/ssl/wiki.fangc.top.key&lt;br /&gt;
                SSLCertificateChainFile /etc/apache2/ssl/chain.crt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 自动获取 ==&lt;br /&gt;
通过CertBot从Let&amp;#039;s Encrypt获取证书并自动续签&lt;br /&gt;
&lt;br /&gt;
=== apache2 ===&lt;br /&gt;
直接在[https://certbot.eff.org/ certbot官网]选择好自己的服务器配置&amp;#039;&amp;#039;&amp;#039;My HTTP website is running &amp;lt;big&amp;gt;？&amp;lt;/big&amp;gt;on &amp;lt;big&amp;gt;？&amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;然后根据提示输入命令&lt;br /&gt;
&lt;br /&gt;
ubuntu22下步骤：&lt;br /&gt;
&lt;br /&gt;
安装snmp&amp;lt;syntaxhighlight lang=&amp;quot;linux-config&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install snapd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;验证：&amp;lt;syntaxhighlight lang=&amp;quot;linux-config&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo snap install hello-world&lt;br /&gt;
hello-world 6.4 from Canonical✓ installed&lt;br /&gt;
$ hello-world&lt;br /&gt;
Hello World!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[分类:Ubuntu]]&lt;br /&gt;
安装certBot：&amp;lt;syntaxhighlight lang=&amp;quot;linux-config&amp;quot;&amp;gt;&lt;br /&gt;
sudo snap install --classic certbot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;获取证书：&amp;lt;syntaxhighlight lang=&amp;quot;linux-config&amp;quot;&amp;gt;&lt;br /&gt;
sudo certbot --apache&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;没报错就ok了&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;注意：&amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;电脑需要80端口可以访问外网否者无法验证网站无法申请成功。&lt;/div&gt;</summary>
		<author><name>FC</name></author>
	</entry>
</feed>