Contents
The cdnnow! staff are not experts in MODX CMS or the authors of the plugin described below.
We provide the settings for connecting a CDN only as a recommendation and cannot fully
guarantee that the instructions are accurate, as the plugin is updated and modified by its authors.
We found instructions in internet howto from cdnsun company. You can use it to connect our CDN, as well as any other.
Creating a CDN Account
If you don't yet have a cdnnow! account, submit a CDN activation request, by providing your email, website, and CMS.
You will receive an email with access to your Control Panel and a default CDN address for your project in the format userXXXXX.nowcdn.co or userXXXXX.clients-cdnnow.ru, where userXXXXX — is your unique identifier.
Connecting MODX to CDN
-
Before making the suggested changes, we recommend that you create a backup copy of your site.
The suggested changes will require you to make changes to the code written in PHP.
- You can connect your domain to CDN instead of userXXXXX.nowcdn.co according to the instructions.
-
In the MODX manager, select «Elements» — «Plugind» —
«New plugin»
- Name the new plugin, for example «CDN».
- In the «plugin code» field enter the code from https://github.com/CDNsun/modx-cdn-plugin (plugin.php file).
- In the plugin code in the __construct method replace the value of _cdnServiceUrl with the address of your CDN domain (either service domain userXXXXX.nowcdn.co, or your own cdn.example.com).
- Go to «System Events» tab and enable the plugin for the OnWebPagePrerender event.
- Click «Save».
- All done!
Checking the site's functionality after connection
Clear the MODX cache («Cache Management» → «Clear Cache»).
View the page source code (Ctrl+U) and make sure that links to static resources (CSS, JS, images) point to your CDN domain.
Having problems with custom fonts?
In your personal account at selfcare.cdnnow.pro in the project settings, set the value to * in
the «Access» tab for the
Access-Control-Allow-Origin field.
Save and publish your project
Validate the website display again.
We wish you fast website loading!
See also:
- Use your own domain for CDN
- Image optimization settings
- How to cache other file types (other extensions)
Cost of CDN services
We provide a free 7 days trial for all our new clients. When you get access to your personal account you also get unlimited access to CDN and image optimization features. During the trial period, you can thoroughly test the download speed; we do not limit the functionality for trial accounts.
If you like our service and are ready for long-term cooperation, we will convert your account from trial to normal.
The cost of placing data in CDN depends on the amount of traffic. You can check your traffic usage during the trial period in your personal account in the “Statistics” section and calculate how much traffic is expected per month. In this section, you can see the volume of requests for image optimization, if you have enabled this feature.
Prices
Starting at $8/month — includes
1000 GB. Unlimited projects
Minimum monthly prepayment of $8. Includes 1000 GB of traffic.
Excess usage is billed postpaid on a tiered pricing model. Enter your monthly traffic volume in gigabytes.
Each plan includes up to 100 000 optimization requests per month
then $1.12 / 10 000 requests
If you have any questions about setup, maintenance, or pricing, you can always contact our support team:
- Email: sales@cdnnow.pro
- The chat at the bottom of the page
- Phone:
8 (800) 600-67-88 (weekdays, 10:00-19:00 Moscow Time)