四虎影视在线影院在线观看,小s货再浪些再咬紧点h,国产精品水嫩水嫩,97精产国品一二三产区

Board logo

標(biāo)題: [求助] 求WDCP控制面板為域名安裝SSl證書(shū) [打印本頁(yè)]

作者: 278507838    時(shí)間: 2015-8-21 06:50     標(biāo)題: 求WDCP控制面板為域名安裝SSl證書(shū)

使用WDCP控制面板,web模式是公用,比如我要?jiǎng)?chuàng)建一個(gè)網(wǎng)站xxx.xxx.com,我想為這個(gè)網(wǎng)站安ssl證書(shū),應(yīng)該如何安裝,求具體的教程
作者: silencingforme    時(shí)間: 2015-8-21 09:37

1、修改當(dāng)前站點(diǎn)的Nginx網(wǎng)站配置文件

  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. }
復(fù)制代碼


2、在引入的偽靜態(tài)規(guī)則文件中添加以下代碼,http強(qiáng)制跳轉(zhuǎn)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;
復(fù)制代碼



重啟,搞定
作者: cvober    時(shí)間: 2015-9-1 22:40

這個(gè)很有用
作者: marzent    時(shí)間: 2016-7-4 03:42

thanks a lot
作者: chen7413    時(shí)間: 2016-10-31 15:19

回復(fù) 2# silencingforme


    在哪個(gè)引入文件中加入代碼呢?Apache的
作者: windpinna    時(shí)間: 2016-12-20 23:58

二樓的兄弟能否再說(shuō)清楚些啊。。。謝謝




歡迎光臨 WDlinux官方論壇 (http://cd-genova.com/bbs/) Powered by Discuz! 7.2