ページへ戻る
印刷
XOOPS の SSL 対応 (http, https どっちでもOK)
をテンプレートにして作成 ::
XOOPS マニア
UsersWiki
:nao-pon/blog/2010-03-27 をテンプレートにして作成
開始行:
#navi
RIGHT:&rsslink(../);
#boxdate
* XOOPS の SSL 対応 (http, https どっちでもOK)
RIGHT:&tag(XOOPS,自宅サーバー,SSL);
気付いている人もいると思いますが、当サイトを SSL 対応とし...
曲がりなりにもログイン機能を有しているので、このご時世 SS...
** SSL 証明書のインストール
- [[無料 SSL 証明書 StartSSL を使う | futuremix:http://fu...
- [[StartCom Free SSL Certificate:http://cryst.tv/experim...
を参考にサーバーの Apache を設定、StartSSL の場合、中間認...
[[sub.ca.crt:http://www.startssl.com/certs/sub.class1.ser...
mv sub.class1.server.ca.crt sub.ca.der
openssl x509 -inform der -in sub.ca.der -out sub.ca.crt
なお、Apache 1.3 での SSL は ひとつのIPでひとつのホストし...
** XOOPS の調整
*** mainfile.php
XOOPS_URL を接続により切り替える。
#code(php,nonumber){{
define('XOOPS_IS_SSL', (isset($_SERVER['HTTPS']) && $_SE...
if (XOOPS_IS_SSL) {
define('XOOPS_URL', 'https://xoops.hypweb.net');
} else {
define('XOOPS_URL', 'http://xoops.hypweb.net');
}
}}
** class/template.php
サイト内リンクをきちんと区分けするため、http と https で...
class/template.php の XoopsTpl クラスに次のメソッドを追加...
これは、XOOPS 2.0.16a の場合だけど、XCL ではプリロードで...
#code(php,nonumber){{
function clear_cache($tpl_file = null, $cache_id = nu...
{
if (XOOPS_IS_SSL) {
$cache_id .= '_SSL';
}
return parent::clear_cache($tpl_file, $cache_id, $compi...
}
function is_cached($tpl_file, $cache_id = null, $comp...
{
if (XOOPS_IS_SSL) {
$cache_id .= '_SSL';
}
return parent::is_cached($tpl_file, $cache_id, $compile...
}
function fetch($resource_name, $cache_id = null, $com...
{
if (XOOPS_IS_SSL) {
$cache_id .= '_SSL';
}
return parent::fetch($resource_name, $cache_id, $compil...
}
}}
** テンプレートの調整
$smarty.const.XOOPS_IS_SSL で SSL を判定できるので、適宜...
RIGHT:&font(90%){&page_comments;};
#navi
終了行:
#navi
RIGHT:&rsslink(../);
#boxdate
* XOOPS の SSL 対応 (http, https どっちでもOK)
RIGHT:&tag(XOOPS,自宅サーバー,SSL);
気付いている人もいると思いますが、当サイトを SSL 対応とし...
曲がりなりにもログイン機能を有しているので、このご時世 SS...
** SSL 証明書のインストール
- [[無料 SSL 証明書 StartSSL を使う | futuremix:http://fu...
- [[StartCom Free SSL Certificate:http://cryst.tv/experim...
を参考にサーバーの Apache を設定、StartSSL の場合、中間認...
[[sub.ca.crt:http://www.startssl.com/certs/sub.class1.ser...
mv sub.class1.server.ca.crt sub.ca.der
openssl x509 -inform der -in sub.ca.der -out sub.ca.crt
なお、Apache 1.3 での SSL は ひとつのIPでひとつのホストし...
** XOOPS の調整
*** mainfile.php
XOOPS_URL を接続により切り替える。
#code(php,nonumber){{
define('XOOPS_IS_SSL', (isset($_SERVER['HTTPS']) && $_SE...
if (XOOPS_IS_SSL) {
define('XOOPS_URL', 'https://xoops.hypweb.net');
} else {
define('XOOPS_URL', 'http://xoops.hypweb.net');
}
}}
** class/template.php
サイト内リンクをきちんと区分けするため、http と https で...
class/template.php の XoopsTpl クラスに次のメソッドを追加...
これは、XOOPS 2.0.16a の場合だけど、XCL ではプリロードで...
#code(php,nonumber){{
function clear_cache($tpl_file = null, $cache_id = nu...
{
if (XOOPS_IS_SSL) {
$cache_id .= '_SSL';
}
return parent::clear_cache($tpl_file, $cache_id, $compi...
}
function is_cached($tpl_file, $cache_id = null, $comp...
{
if (XOOPS_IS_SSL) {
$cache_id .= '_SSL';
}
return parent::is_cached($tpl_file, $cache_id, $compile...
}
function fetch($resource_name, $cache_id = null, $com...
{
if (XOOPS_IS_SSL) {
$cache_id .= '_SSL';
}
return parent::fetch($resource_name, $cache_id, $compil...
}
}}
** テンプレートの調整
$smarty.const.XOOPS_IS_SSL で SSL を判定できるので、適宜...
RIGHT:&font(90%){&page_comments;};
#navi
ページ名: