Login     Sign up
Jcow Blog
100 months ago
8096 Views

Step.1 Add your site domain to Cloudflare

Go to http://www.cloudflare.com and login.(If you don't have an account, just sign up free)
Click "add site" on the top menu, and step by step add your Jcow site domain. You can select "Free plan" while adding site.

Step.2 Configure SSL

On Cloudflare, click your site name, and click "Page Rules" on the top menu, you will see a "Add new rule" section. Enter /* in the "Rule pattern", and click to turn on the "Always https", and click "Add rule" button.

Step.3 Configure Jcow

Edit your config file my/config.php, add these lines just in beginning of the source code:

if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $arr = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
    $_SERVER['REMOTE_ADDR'] = trim($arr[0]);
}

Then edit the $uhome value, modify http:// to https://

Finished!

Please note, there will be a few hours before the SSL enabled due to DNS TTL.
If you have any questions, please comment here.

@paul :D
82 months ago
@paul :D
82 months ago
@paul where is this located? $uhome value
45 months ago
2