微信小程序配置https域名

 时间:2024-10-16 11:41:38

1、这里以腾讯云举例,首先登陆腾讯云,进入控制台,点击ssl证书管理

微信小程序配置https域名

2、点击申请证书,然后选择申请免费证书,之后就需要填写相关资料。这里填写通用名称和申请邮箱就可以了。然后验证域名身份,有添加dns解析验证和文件上传两种方式。

微信小程序配置https域名

3、域名验证成功后需要配置服务器,下载腾讯云提供的证书,根据你架设的服务器把证书相关文件复制到服务器(比如D:/Apache/conf/ssl/),以apache来说,第一步:首先修改conf/httpd.conf,找到#LoadModule ssl_module modules/mod_ssl.so 和 #Include conf/extra/httpd-ssl.conf,然后去掉前面的#号注释。第二步:修改conf/extra/httpd-ssl.conf内容如下,Listen 443<VirtualHost www.**.com:443> DocumentRoot "D:/web/appoint/public" ServerName localhost:443 ServerAlias 127.0.0.1 ServerAdmin master@***.com DirectoryIndex index.html index.htm index.php default.php app.php u.php ErrorLog logs/example_error.log CustomLog logs/example_access.log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" SSLEngine On SSLCertificateFile "D:/Apache/conf/ssl/2_www.**.com.crt" SSLCertificateKeyFile "D:/Apache/conf/ssl/3_www.**.com.key" SSLCertificateChainFile "D:/phpStudy/Apache/conf/ssl/1_root_bundle.crt"</VirtualHost>注意:SSLCertificateFile、SSLCertificateKeyFile、SSLCertificateChainFile就是你证书的路径

4、重启apache,现在访问https://www.**.com,如果访问成功,恭喜,你已经配置好了!

  • jenkins添加用户
  • linux系统setroubshoot进程占用CPU过高
  • 网易邮箱如何删除邮件标签
  • 魅族16sPro如何复制门禁卡
  • linux 提示su authentication failure怎么办
  • 热门搜索
    国庆手抄报图片 儿童端午节手抄报简单 预防病毒手抄报内容 教师节手抄报图片大全 过年的手抄报 八一建军节手抄报 漫游语文世界手抄报 文明手抄报图片 元旦节的手抄报 世界读书日手抄报内容