方法1:
1,找到文store.acgsan.com/app/site/controller/admin/module.php,去掉文件中如下三行注释
public function index()
{
$lab = app::get('desktop')->getConf('use_ssl') ? app::get('desktop')->_('后台禁用强制SSL') : app::get('desktop')->_('后台启用强制SSL');
$this->finder('site_mdl_modules', array(
'title' => app::get('site')->_('系统模块'),
'base_filter' => array(),
'actions'=>array(
// array('label'=>app::get('desktop')->_('启用SSL'),'submit'=>'index.php?app=site&ctl=admin_module&act=ssl_on'),
// array('label'=>app::get('desktop')->_('禁用SSL'),'submit'=>'index.php?app=site&ctl=admin_module&act=ssl_off'),
// array('label'=>$lab,'href'=>'index.php?app=site&ctl=admin_module&act=desktop_ssl'),
),
2,找到文件store.acgsan.com/app/wap/controller/admin/module.php,去掉文件中如下四行注释
public function index()
{
// $lab = app::get('desktop')->getConf('use_ssl') ? app::get('desktop')->_('后台禁用强制SSL') : app::get('desktop')->_('后台启用强制SSL');
$this->finder('wap_mdl_modules', array(
'title' => app::get('wap')->_('系统模块'),
'base_filter' => array(),
'actions'=>array(
// array('label'=>app::get('desktop')->_('启用SSL'),'submit'=>'index.php?app=wap&ctl=admin_module&act=ssl_on'),
// array('label'=>app::get('desktop')->_('禁用SSL'),'submit'=>'index.php?app=wap&ctl=admin_module&act=ssl_off'),
// array('label'=>$lab,'href'=>'index.php?app=wap&ctl=admin_module&act=desktop_ssl'),
),
3,以http形式进入后台如下版块,我们将下图全部启用SSL
4,如果启用失败,可直接通过数据库操作,具体如下图
5,将use_ssl全部改为true即可,一句sql解决(自己想,不然就手动)
方法2:http://www.shopexdream.com/article-27.html
1、nginx开启支持https,需要重新编译nginx,增加–-with-http_ssl_module,
配置ssl证书(可到阿里云申请免费证书1年)
2、数据库先备份,然后执行
update sdb_site_modules set use_ssl='true'
insert into sdb_base_setting values('desktop','use_ssl','b:1;');
3、修改
app/desktop/lib/controller.php
将
$_GOTO = 'index.php?ctl=passport&url='.$url.'¶ms='.$params;
echo "<script>location ='$_GOTO'</script>";exit
改成如下
$_GOTO = app::get('desktop')->router()->gen_url(array(),1).'index.php?ctl=passport&url='.$url.'¶ms='.$params; header('location:'.$_GOTO);
4、命令行里定位到网站的如下目录
app/base/
执行
./cmd
update