MyBB CDN Using Google App Engine

MyBB Free CDN using Google App Engine
MyBB Free CDN using Google App Engine
Content Delivery Network(CDN) will speed up your website and also very help full if you experiencing any traffic spikes like slash dot effect or your post is displayed on first page of Reddit.

What file types can be hosted on CDN?
Most CDNs host static resources such as images, videos, audio clips, CSS files and JavaScript or you will host entire static website on it. You will find many Common JavaScript file and css file are hosted on public cdn like Google, Microsoft, Yahoo or Cloudflare.

How CDN work?

1.)A content delivery network streamlines this process by shortening the distance the request and data must travel.

2.)CDN servers are spread out geographically and over the Internet, they also provide enhanced reliability because they are not affected by a slowdown or outage in one area.

3.)Another advantage of storing your files in each Point of Presence (PoP) on the CDN network is that the requests served by the CDN servers aren’t processed by your servers, thus lightening those servers’ load.

Why We Choose Google App Engine as a CDN

Google App Engine application use CDN replication automatically. Static content like image, CSS, JavaScript are replicated all across the globe. Users while be serve with the geographically closest file. Speeding up transfer, routing time and latency.

App Engine gives you a some free quota which is sufficient to us check below:

  • 28 free instance hours
  • 1Gb database
  • 50 000 database read/write/small
  • 1GB Outgoing Bandwidth
  • 1GB Incoming Bandwidth
  • 100 email
  • 5 Million page views / month.

so in my opinion its a sufficient for any small MyBB forum.

How to Create a MyBB CDN

Tutorial tested on a MyBB 1.8, no support question for MyBB 1.6

Note:if you don’t want to download and upload your forum file manually skip step 1.7 and direct go to step 2.3.

1.1. Go to appengine.google.com and sign-in using your Google Account.

1.2. Click the “Create an Application” button. Since this is your first time, Google will send a verification code via SMS to your mobile phone number. Type the code and you’re all set to create apps with Google App Engine.

1.3. Pick an Application Identifier and it becomes the sub-domain* of your MyBB CDN. Give your app a title (say techelexforumcdn1), set the Authentication Option as “Open to all users”, agree to the terms and create the application.

App Engine Application First Setting
App Engine Application First Setting

1.4. OK, now that we have reserved the APP ID, it’s time to create and upload the MyBB CDN application to Google App Engine. Go to python.org, download the 2.7 Installer and install Python. If you are on Mac, Python 2.7 is already installed on your computer.

1.5. Go to code.google.com, download the Google App Engine SDK for Python and follow the wizard to install the SDK on your computer. When the installation wizard has finished, click the “Run Launcher” button to open the App Engine Program.

Sumo - Best Way to 2x Your Emailing List, Money and Social Shares, No Code Required

1.6. Choose Edit -> Preferences inside the Google App Engine Launcher program from the desktop and set the correct values see screenshot belowfor the Python Path, App Engine SDK and the Text Editor (set this is as WordPad or write.exe and not notepad++.exe)

App Engine SDK Preferences Settings
App Engine SDK Preferences Settings

1.7. Download this MyBB CDN Zip File and extract it to your desktop. The zip file contains a couple of folders, YAML and files that you can view inside WordPad.

1.8. Go to your webhost using control panel or use any FTP program. Download following folders in MyBB CDN folder which is extract in previous step.check below screen shot.

Uploading File Lists for MyBB CDN
Uploading File Lists for MyBB CDN

1.9. Click File – > Add Existing Application under the Google App Launcher program and browse to the folder that contain the index.yaml and other files that you extracted in Step 7. Once the project is added to App Engine, select the project and click Edit to replace techelexforumcdn1 with your App ID. Save and close the file.

Configuration File for MyBB CDN
Configuration File for MyBB CDN

2.0. Click Deploy, enter you Google account credentials and, within a minute or two, your MyBB CDN will be deployed and become ready for use. The URL (or web address) of your new MyBB CDN will be yourappid.appspot.com (replace yourappid with your App Engine Identifier).

Deployed Output of MyBB CDN
Deployed Output of MyBB CDN

The sub-domain or the App ID will uniquely identify your App Engine application. For this example, we’ll use techelexforumcdn1 as the Application Identifier though you are free to choose any other unique name.

2.1. Now go ACP->Configuration->Server and Optimization Options and enable Use a CDN? , then in URL to use for static files simply put your cdn address like https://techelexcdn1.appspot.com or http://techelexcdn1.appspot.com

Setting in MyBB Forum for CDN
Setting in MyBB Forum for CDN

2.2. Open your Forum and left click on anywhere then click on View Page Source and check script and css link. now its loading with your cdn url. check one image from my cdn.

If you dont want to download your files and update into in a google app engine.

2.3. Download this SymPullCDN Zip File and extract it to your desktop. The zip file contains a couple of folders, YAML and files that you can view inside WordPad.You will have to modify two files: main.py and app.yaml.

2.4. Open main.py in your favorite text editor and find this line:

Origin = âhttp://replace*me/â and change it to the domain name you would like to use as your like 
Origin = http://community.mybb.com/

2.5. open app.yaml and find the following line:

Application: *replace*me*
replace it with identifier which is choose in step 3

2.6. Now Follow step 1.9 to 2.2.

If you have any questions, feel free to ask!

Leave a Comment

25$ Lifetime Deal Alert: Optimize your 5000 Image / Month withShortPixel
+ +
9 Shares
Tweet
Share
+1
Share
Pin