Serve joomla site on Amazon CDN - web-hosting

I want to set up the whole joomla site on CDN,
so that to increase the performance of our website.
How is it possible to put entire site on CDN?

You'll want to serve static (unchanging) assets like CSS and JavaScript from a CDN.
The dynamic pages (PHP) generated by a CMS are not good candidates for a CDN.
To setup a CDN, you'll host the website elsewhere (like you would normally).
Then, to fetch the assets, you'd create a pull zone that points to the folder where the assets live.
For example, if my site is http://example.com and my CSS/JS lives at http://example.com/static, I'd create a pull zone to grab the assets.
You can configure the CDN with a CNAME (subdomain) record so assets can be fetched from URLs like http://cdn.example.com/somefile.css.
You would then modify all references to static assets so that they're served by the CDN (using the http://cdn... URL.

Related

How can I use cloudfront to have images hosted by prismic come from my own domain?

I am using prismic headless CMS which hosts images on its own cdn.
Images have a name that is not SEO friendly and they are hosted on an external domain.
Prismic does not offer a way to set up a custom domain for images.
Our website also uses cloudfront which caches pages.
Is there a way to parse html content and rewrite image urls so that they come from our own domain?
Thanks for your help !

how to use cookie-free domains (yslow)

I was trying to solve the problem with cookie-free, the yslow has suggested to create a subdomain. I did, but the yslow still "show" the problem.
i didn't set the cookie´s domain in the page, cause i don't know how to do it.
anyone know a tutorial or a solution to this problem?
Create a subdomain such as static.yourwebsite.com which is where you will deliver all your static files from.
Point your new subdomain to the /wp-content directory for a WordPress installation.
For cPanel users, you will need to update the document root field from public_html/static to public_html/wp-content like the screenshot below. cpanel document root
Edit your config.php file to reflect the following:
define("WP_CONTENT_URL", "http://static.yourwebsite.com");
define("COOKIE_DOMAIN", "www.yourwebsite.com");
Now that your cookie domain and static content subdomain are set, you can begin delivering static content without the server setting an unnecessary cookie for static assets.
https://www.keycdn.com/support/how-to-use-cookie-free-domains/
To work around this problem, make sure that static components are requested with cookie-free requests by creating a subdomain and hosting them there.
If your domain is www.example.org, you can host your static components on static.example.org. However, if you've already set cookies on the top-level domain example.org as opposed to www.example.org, then all the requests to static.example.org will include those cookies.
In this case, you can buy a whole new domain, host your static components there, and keep this domain cookie-free.
Yahoo! uses yimg.com, YouTube uses ytimg.com, Amazon uses images-amazon.com and so on.
Read More
Serve static content from a different domain to avoid unnecessary cookie traffic.
When the browser requests a static image and sends cookies with the request, the server ignores the cookies. These cookies are unnecessary network traffic.
Move all your static content on a different domain, where no cookies
are set.
Move your static content on a different sub domain and set
all the cookies to the www subdomain.

Magento: use subdomains as a CDN for media folder

We are planning to use subdomains ie.cdn1.example.com, cdn2.example.com to deliver product images.
How to configure Magento for this?
How to handle Magento cache folder which save auto-generated thumbnails as per template?
If you're using an origin pull CDN like AWS Cloudfront, you just fill in the information telling their system your web server name, they provide you with a server name (randomchars.cloudfront.net) on their end and then you use a CNAME record in your DNS to point their server name at your subdomain name like media.example.com.
Then your base media URL becomes http://media.example.com/media/ and everything's pretty much automatic from there.
Using origin pull gets rid of having to maintain a separate system to host your images and try to get Magento to upload to it, or figure out how to replicate Magento's media folder to it.

Image caching at server side

For a product catalog web application created in java/spring, which gets the product images from a third party web service, what would be a good strategy for image caching at server side ?
Thanks.
Have your site create IMG references that point to a locally hosted page. This page will do the following:
if (the requested image does not exist in the local cache) {
go to the third party site and save it to the local cache
}
serve the image from the local cache
Depending on how often the images are likely to change on the third party site, you may want to add a cron job that routinely deletes images which are older than X days.

Hosting wordpress Images in a sub-domain when my wordpress is installed in a subdomain

I have a gallery for my website (mysite.com) as a sub-domain (gallery.mysite.com) but I want to host my wordpress Images in another sub-domain (images.gallery.mysite.com) I have changes the "Full URL path to files" but wordpress is not uploading the images to the folder how can I fix this or are there any other solutions, because I wand to speed up the load time of my site.
Thanks
As I understand if, you want wordpress to upload the file into another location other than the default one. if this is the case, take a look at Editing the default image/file upload location of WordPress!

Resources