From xt:Commerce 技術文件
一定要先編輯 configure.php 檔案後才能在你的商店中啟用 SSL 機制.
在以下列表中有如何調校環境的設定說明
和
請從網頁伺服器中下載這兩個目錄內的 configure.php 環境設定檔, 並使用文字編輯器來開啟編輯.
在 includes/configure.php 檔案中你可以找到 下述片段 ,你可以依此範例來作修改.
define('HTTPS_SERVER', 'https://localhost'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', false); // secure webserver for checkout procedure?
以 'true'值來取代原先的false值,和使用 https://localhost 取代,並調整成你的 SSL Domain/Proxy 描述。
例如: https://www.Your-Domain.com
| 如果你的 SSL 域名無法使用,請與你的虛擬主機供應商聯繫.
|
範例結果:
define('HTTPS_SERVER', 'https://www.Your-Domain.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', 'true'); // secure webserver for checkout procedure?
現在你開啟 admin/includs/configure.php 檔案來編輯.
片段:
define('HTTPS_CATALOG_SERVER', 'https://localhost');
define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
就如上述的的例子來作修改.
範例結果:
define('HTTPS_CATALOG_SERVER', 'https://www.Your-Domain.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for checkout procedure?
| 有些虛擬主機還需要在本系統中再作特別的參數調整, 你可以從下列的供應商中找到各式的調校範例
|
[edit] Hosteurope
開啟並編修 includes/application_top.php
原參數值 (第51行)
$request_type = (getenv('HTTPS') == '1' || getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';
以下述語法來取代
$request_type = ($_SERVER['HTTP_X_FORWARDED_HOST'] == 'ssl.webpack.de') ? 'SSL' : 'NONSSL';
[edit] Domainfactory
檔案: includes/configure.php
define('HTTPS_SERVER', 'https://www.Your-Domain.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', false); // secure webserver for checkout procedure?
修改為:
define('HTTPS_SERVER', 'https://sslsites.de/Your-Domain.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', true); // secure webserver for checkout procedure?
檔案: admin/includes/configure.php
define('HTTPS_CATALOG_SERVER', 'https://www.Your-Domain.com');
define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
修改為:
define('HTTPS_CATALOG_SERVER', 'https://sslsites.de/Your-Domain.com');
define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
| 請將 "Your-Domain.com" 改正為你的網域名稱
|
- 編輯 includes/application_top.php 檔案
$request_type = (getenv('HTTPS') == '1' || getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';
也修改為:
$request_type = ($_SERVER['HTTP_X_FORWARDED_HOST'] == 'sslsites.de') ? 'SSL' : 'NONSSL';