博客
关于我
微信开发之——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/

你可能感兴趣的文章
nginx 集群配置方式 静态文件处理
查看>>
Nginx+Django-Python+BPMN-JS的整合工作流实战项目
查看>>
Nginx+Keepalived+LVS集群实战
查看>>
Nginx+Keepalived实现简单版高可用主备切换
查看>>
nginx+mysql+redis+mongdb+rabbitmq 自动化部署脚本
查看>>
nginx+php的搭建
查看>>
nginx+tomcat+memcached
查看>>
Nginx+Tomcat实现动静分离
查看>>
nginx+Tomcat性能监控
查看>>
nginx+uwsgi+django
查看>>
nginx+vsftp搭建图片服务器
查看>>
Nginx-http-flv-module流媒体服务器搭建+模拟推流+flv.js在前端html和Vue中播放HTTP-FLV视频流
查看>>
nginx-vts + prometheus 监控nginx
查看>>
Nginx/Apache反向代理
查看>>
Nginx: 413 – Request Entity Too Large Error and Solution
查看>>
nginx: [emerg] getpwnam(“www”) failed 错误处理方法
查看>>
nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:
查看>>
nginx:Error ./configure: error: the HTTP rewrite module requires the PCRE library
查看>>
Nginx:objs/Makefile:432: recipe for target ‘objs/src/core/ngx_murmurhash.o‘解决方法
查看>>
Nginx、HAProxy、LVS
查看>>