
nginx配置https
发布日期:2021-05-10 06:21:05
浏览次数:23
分类:精选文章
本文共 1669 字,大约阅读时间需要 5 分钟。
������Nginx������https
1. ���������������������
���������������������������
mkdir cd1 && cd cd1
���������������
openssl genrsa -des3 -out private.key 2048
���������������������
openssl req -new -key private.key -out server.csr
���������������������
openssl rsa -in private.key -out server.key
������x509���������
openssl x509 -req -in server.csr -out server.crt -outform pem -signkey server.key -days 365
���������������������������������������������������������������������Nginx���������������
2. ������Nginx
1.������Nginx���������������������
cd /etc/nginx/
-
������
nginx.conf
������������������������server { listen 443; # ������������ server_name localhost; # IP������/������ ssl on; # ������ssl root html; # ������������ index index.html index.htm; # ��������������� ssl_certificate cert/server.crt; # ������������ ssl_certificate_key cert/server.key; # ������������ ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; }}
������������������������������������������������������������������
-
���������������������������
-
������������������������Nginx���
nginx -s reload
���������������Nginx������������������������������������������������������������
systemctl status nginx
-
������curl������������SSL���������
curl -I https://127.0.0.1
-
������������������������
https://127.0.0.1
���������������������������������������������������������������������������������������������������������
3. ������Nginx
4. ������������
������
发表评论
最新留言
表示我来过!
[***.240.166.169]2025年04月05日 19时23分26秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
Nmap扫描工具介绍
2021-05-09
玩玩小爬虫——试搭小架构
2021-05-09
Sql Server之旅——第十站 看看DML操作对索引的影响
2021-05-09
Python大神编程常用4大工具,你用过几个?
2021-05-09
centos7一步一步搭建docker jenkins 及自定义访问路径重点讲解
2021-05-09
【Flink】Flink 底层RPC框架分析
2021-05-09
MySQL错误日志(Error Log)
2021-05-09
oracle使用DBMS_RANDOM包生成随机数据
2021-05-09
C++高精度模板
2021-05-09
解决:angularjs radio默认选中失效问题
2021-05-09
windows环境下安装zookeeper(仅本地使用)
2021-05-09
缓冲区溢出实例(一)--Windows
2021-05-09
Badboy录制脚本时,提示脚本错误的解决方法
2021-05-09
PHP一句话木马小总结与SQL语句写一句话木马
2021-05-09
关于计数排序
2021-05-09
Python中字符串前添加r ,b, u, f前缀的含义
2021-05-09
Hadoop学习笔记—Yarn
2021-05-09