无标题文档
wdCP系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdCDN系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
wdOS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdDNS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
注册 发贴 提问 回复-必看必看 wddns免费智能 DNS 开通 本地或虚拟机使 用wdcp 一键包在mysql编 译时"卡住"
【300G高防】双线 无视攻击 wdcp官方技术支持/服务 阿里云8折优惠券 无敌云 腾讯云优惠中,现注册更有260代金额券赠送
返回列表 发帖
提问三步曲: 提问先看教程/FAQ索引(wdcp,wdcp_v3,一键包)及搜索,会让你更快解决问题
1 提供详细,如系统版本,wdcp版本,软件版本等及错误的详细信息,贴上论坛或截图发论坛
2 做过哪些操作或改动设置等

温馨提示:信息不详,很可能会没人理你!论坛有教程说明的,也可能没人理!因为,你懂的

[求助] 求WDCP控制面板为域名安装SSl证书

使用WDCP控制面板,web模式是公用,比如我要创建一个网站xxx.xxx.com,我想为这个网站安ssl证书,应该如何安装,求具体的教程

1、修改当前站点的Nginx网站配置文件

  1. server {        listen 80;
  2.         listen 443;
  3.         server_name xxx.com www.xxx.com;
  4.         root /www/web/xxx_com/public_html;
  5.         index  index.html index.php index.htm;
  6.         error_page  400 /errpage/400.html;
  7.         error_page  403 /errpage/403.html;
  8.         error_page  404 /errpage/404.html;
  9.         ssl on;
  10.         ssl_certificate_key  /www/wdlinux/nginx/conf/xxx.key;
  11.         ssl_certificate  /www/wdlinux/nginx/conf/xxx.crt;
  12.         location ~ \.php$ {
  13.                 fastcgi_pass   127.0.0.1:9000;
  14.                 fastcgi_index  index.php;
  15.                 include fcgi.conf;
  16.         }
  17.         include rewrite/xxx.conf;
  18. }
复制代码


2、在引入的伪静态规则文件中添加以下代码,http强制跳转https
  1. if ($server_port = 80) {
  2. return 301 https://$server_name$request_uri;
  3. }
  4. if ($scheme = http) {
  5. return 301 https://$server_name$request_uri;
  6. }
  7. error_page 497 https://$server_name$request_uri;
复制代码



重启,搞定

TOP

这个很有用

TOP

thanks a lot

TOP

回复 2# silencingforme


    在哪个引入文件中加入代码呢?Apache的
五龙影视

TOP

二楼的兄弟能否再说清楚些啊。。。谢谢
岁月静好

TOP

返回列表