博客
关于我
微信开发之——Ubuntu Apache2的https域名配置
阅读量:328 次
发布时间:2019-03-04

本文共 846 字,大约阅读时间需要 2 分钟。

我的网站是腾讯云服务器的,根据官网的SSL证书安装配置指示:

下载腾讯颁发的SSL证书:有3个文件,分别是:

1_root_bundle.crt,2_www.域名.com.crt,3_www.域名.com.key

1、添加监听端口

编辑Apache端口配置(/etc/apache2/ports.conf),加入443端口(SSL缺省使用):

Listen 80

Listen 443

B、设置site-enabled

上文安装完后,会在/etc/apache2/sites-available/目录下生成一个缺省的default-ssl文件。缺省的网页目录仍然是/var/www/。我们可以创建一个链接到site-enabled目录。

ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/001-ssl

C、修改配置文件

HTTPS监听端口缺省443:

把端口改为443,在<Virtualhost>下加入SSL认证配置,其它的根据需要自己定制 与普通配置无异:

vim /etc/apache2/sites-enabled/000-default.conf,修改以下内容

DocumentRoot "/var/www/html"    ServerName www.域名.com    SSLEngine on    SSLCertificateFile /home/axxxx/2_www.域名.com.crt    SSLCertificateKeyFile /home/axxxx/3_www.域名.com.key    SSLCertificateChainFile /home/axxxx/1_root_bundle.crt

2、重启APACHE

# /etc/init.d/apache2 restart

 

如有问题,请咨询我的qq:1290851757,备注:csdn博客问问题的

转载地址:http://kzwh.baihongyu.com/

你可能感兴趣的文章
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named 'pandads'
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>
No qualifying bean of type XXX found for dependency XXX.
查看>>
No qualifying bean of type ‘com.netflix.discovery.AbstractDiscoveryClientOptionalArgs<?>‘ available
查看>>
No resource identifier found for attribute 'srcCompat' in package的解决办法
查看>>
no session found for current thread
查看>>
No static resource favicon.ico.
查看>>
no such file or directory AndroidManifest.xml
查看>>
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
查看>>
NO.23 ZenTaoPHP目录结构
查看>>
no1
查看>>
NO32 网络层次及OSI7层模型--TCP三次握手四次断开--子网划分
查看>>
NOAA(美国海洋和大气管理局)气象数据获取与POI点数据获取
查看>>
NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
查看>>
node
查看>>