博客
关于我
微信开发之——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 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
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
查看>>