分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > IT知识

https的配置

发布时间:2023-09-06 01:55责任编辑:郭大石关键词:配置http
nginx 配置全站 https1 . 在nginx目录下创建cert目录拷贝下面2个文件到cert目录下证书文件: xxx.pem证书私钥; xxx..key2 . 修改虚拟主机配置文件server { ???//--- 80 端口改为 443 ssl ???# listen 80; ???listen ?443 ssl; ???//--- 80 端口改为 443 ssl ???server_name ?www.ktvll.com; ???index index.html index.htm index.php; ???root /www/ktvll; ???include /alidata/www/ktvll/.htaccess; ???//-----------新增 https 部分---------------- ???ssl_certificate ?????/nginx/cert/21431193.pem; ???ssl_certificate_key ?/nginx/cert/21431193.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; ???//-----------新增 https 部分---------------- ???location ~ \.php { ???????fastcgi_pass ?127.0.0.1:9000; ???????fastcgi_index index.php; ???????include fastcgi.conf; ???????fastcgi_split_path_info ^(.+\.php)(.*)$; ???????fastcgi_param PATH_INFO $fastcgi_path_info; ???} ???location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ ???{ ???????expires 30d; ???} ???location ~ .*\.(js|css)?$ ???{ ???????expires 1h; ???} ???access_log ?/alidata/log/nginx/access/default.log; ???autoindex ???off; ???error_page 404 = index.php;}# HTTP 全部跳转到 HTTPSserver { ???listen 80; ???server_name www.ktvll.com; ???return 301 https://$server_name$request_uri;}

  

https的配置

原文地址:https://www.cnblogs.com/xin-jun/p/9081383.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved