Post by papetarie » Mon Aug 13, 2012 1:46 pm

How can I make settings for Content Delivery Network? I looked everywhere but I no found for OpenCart 1.5.31. is someone able to help me with information?

New member

Posts

Joined
Sat Oct 22, 2011 1:26 am
Location - bucuresti

Post by scarecr0w12 » Thu Mar 07, 2013 4:29 am

A CDN is DNS side not Site side, So with a CDN such as CloudFlare you just point your DNS settings to their Name Servers and your good to go. Although when a person comes to your site however it doesn't always load Their IP but the one of cloudflare, Fix that by doing this:

Open your Index.php file on the top level of the site and add:

Code: Select all

// Cloudflare CDN
if ($_SERVER["HTTP_CF_CONNECTING_IP"]) {
    $_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"];
    }
Right below the:

Code: Select all

// Version
define('VERSION', '1.5.5.1');

Hope this helps

Newbie

Posts

Joined
Thu Mar 07, 2013 4:26 am
Who is online

Users browsing this forum: No registered users and 3 guests