跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
根类
所有页面
统计信息
分类树
特殊页面
FC
搜索
搜索
外观
登录
个人工具
登录
查看“︁为网站配置ssl证书”︁的源代码
页面
讨论
简体中文
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
外观
移至侧栏
隐藏
←
为网站配置ssl证书
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 手动获取 == === apache2 === 新建一个文件夹用于存放证书文件 到阿里云或者其他什么地方注册一个证书绑定相应的域名审核完成后下载到本地 复制到新建的用于存放证书的文件夹中 修改apache443端口的配置文件,插入下面内容,第一行开启ssl,后面三行指定ssl秘钥证书<syntaxhighlight lang="linux-config"> SSLEngine on # A self-signed (snakeoil) certificate can be created by inst> # the ssl-cert package. See # /usr/share/doc/apache2/README.Debian.gz for more info. # If both key and certificate are stored in the same file, on> # SSLCertificateFile directive is needed. SSLCertificateFile /etc/apache2/ssl/public.crt SSLCertificateKeyFile /etc/apache2/ssl/wiki.fangc.top.key SSLCertificateChainFile /etc/apache2/ssl/chain.crt </syntaxhighlight> == 自动获取 == 通过CertBot从Let's Encrypt获取证书并自动续签 === apache2 === 直接在[https://certbot.eff.org/ certbot官网]选择好自己的服务器配置'''My HTTP website is running <big>?</big>on <big>?</big>'''然后根据提示输入命令 ubuntu22下步骤: 安装snmp<syntaxhighlight lang="linux-config"> sudo apt update sudo apt install snapd </syntaxhighlight>验证:<syntaxhighlight lang="linux-config"> $ sudo snap install hello-world hello-world 6.4 from Canonical✓ installed $ hello-world Hello World! </syntaxhighlight> [[分类:Ubuntu]] 安装certBot:<syntaxhighlight lang="linux-config"> sudo snap install --classic certbot </syntaxhighlight>获取证书:<syntaxhighlight lang="linux-config"> sudo certbot --apache </syntaxhighlight>没报错就ok了 '''<big>注意:</big>'''电脑需要80端口可以访问外网否者无法验证网站无法申请成功。
返回
为网站配置ssl证书
。
搜索
搜索
查看“︁为网站配置ssl证书”︁的源代码
添加话题