博客
关于我
阿里云域名https证书(ssl证书)配置
阅读量:739 次
发布时间:2019-03-22

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

阿里云域名SSL证书(HTTPS证书)配置及Nginx配置指南

在阿里云域名控制台完成域名解析后,进入SSL证书管理界面进行配置。通过搜索功能获取免费或付费SSL证书,并下载相应的 .pem.key 文件。将这些文件存储到服务器指定目录(如Nginx配置目录下)。

在云服务器ECS上新增443端口安全规则(通常443、80端口默认已开启),然后配置Nginx的HTTPS设置。确保Nginx安装目录下创建cert文件夹,并在配置文件中启用HTTPS模块。

以下是Nginx配置示例:

server {
listen 443 ssl;
server_name online2.DDDD.cn;
index index.html index.htm;
root D:\wx_address_tomcat\webapps\spring_70_s4s2h5_03;
ssl_certificate "D:/nginx2/nginx-1.15.1/cert/1648469_online2.DDDD.cn.pem";
ssl_certificate_key "D:/nginx2/nginx-1.15.1/cert/1648469_online2.DDDD.cn.key";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location / {
proxy_pass http://localhost:8888;
}
location /resources/ {
alias D:/apache-tomcat-7.0.59_64/XXXX/ROOT/resources/;
expires 1d;
}
}

注意:如果Nginx提示缺少ssl模块,需重新编译Nginx。进入源码目录,执行以下命令:

./configure --with-http_ssl_module
make

停止当前Nginx服务,备份原有配置文件,覆盖新编译文件后重新启动服务器。

完成以上步骤后,测试域名是否正确解析HTTPS流量。

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

你可能感兴趣的文章
NMF(非负矩阵分解)
查看>>
nmon_x86_64_centos7工具如何使用
查看>>
NN&DL4.1 Deep L-layer neural network简介
查看>>
NN&DL4.3 Getting your matrix dimensions right
查看>>
NN&DL4.7 Parameters vs Hyperparameters
查看>>
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
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
查看>>