当前位置:论坛首页 > Windows面板 > 求助

ngnix部署了腾讯的ssl怎么强制跳转到https

发表在 Windows面板2017-9-30 18:32 [复制链接] 2 5901

本帖最后由 子非月 于 2017-9-30 18:35 编辑

win2012    ngnix部署了腾讯的ssl怎么强制跳转到https


做了个301但是跳转网页打不开了 {ZR%GX]7J~2R%JM{A8(1.png




是需要重新写伪静态还是怎么改



  1. if (!-e $request_filename) {

  2.     rewrite ^(.*)$ /index.php?s=/$1 last;

  3. }

  4. if ($host = ‘baidu.com’) {

  5.     rewrite ^/(.*)$ http://baidu.com/$1 permanent;

  6. }
复制代码
或者在配置文件里改,跳转也是访问不了。谢谢各位大佬指点
  1. #START-SITE
  2. server {
  3.         listen 80;
  4.         server_name  baidu.com;  
  5.         access_log  logs/baidu.com.access.log;
  6.         root   D:/wwwroot/baidu.com;
  7.         index  index.html index.php index.htm index.asp index.aspx default.php default.html default.htm default.asp default.aspx ;
  8.         
  9.         include rewrite/baidu.com.conf;
  10.                
  11.         #START-ERROR-PAGE
  12.         error_page 403 /403.html;
  13.         error_page 404 /404.html;
  14.     error_page 502 /502.html;
  15.         #END-ERROR-PAGE
  16.         
  17.         #301-START
  18. #301-END
  19.         
  20.         
  21.         #REFERER-START
  22.         #REFERER-END
  23.         
  24.         #PROXY-START
  25.         #PROXY-END
  26.         
  27.         #START-SSL
  28.     listen       443 ssl;
  29.     ssl_certificate      ssl/baidu.com.crt;
  30.     ssl_certificate_key  ssl/baidu.com.key;
  31.     ssl_session_cache    shared:SSL:1m;
  32.     ssl_session_timeout  5m;
  33.     ssl_ciphers  HIGH:!aNULL:!MD5;
  34.     ssl_prefer_server_ciphers  on;
  35. #END-SSL        
  36.         
  37.         #START-PHP
  38.         location ~ \.php$ {
  39.                 root   D:/wwwroot/baidu.com;
  40.                 fastcgi_pass   127.0.0.1:4571;
  41.                 fastcgi_index  index.php;
  42.                 fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
  43.                 include        fastcgi_params;
  44.     }
  45. #END-PHP
  46. }
  47. #END-SITE


复制代码


使用道具 举报 只看该作者 回复
发表于 2017-10-7 14:08:33 | 显示全部楼层
微信截图_20171007140752.png

----------------------------------------------------------------------------------------------------
菜鸟团队技术博客点击联系
使用道具 举报 回复 支持 反对
发表于 2017-10-12 09:49:39 | 显示全部楼层
win面板没那个功能,我自己再配置文件里加了代码可以了
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理

工作时间:09:00至24:00

快速回复 返回顶部 返回列表