Hi,
Can plaease somebody point me to correct setup if I want my files to be served from subdomain?

As I understood I should choose origin pull mode.
Then create a subdomain.
Copy all files inside same structure to new subdomain.
In config details of CDN module add new subdomain

Should I add some rules inside htaccess of new subdomain?
Thank you very much for help.

Comments

Wim Leers’s picture

Title: serving files from subdomain - setup » Tutorial on how to use the CDN module + Far Future expiration + subdomains on the same webserver ("fake CDN")
Assigned: Unassigned » Wim Leers
Status: Active » Postponed

The easiest way:
- make sure that your subdomains serve the exact same content as the main domain
- don't enable the CDN module's Far Future expiration, which requires special care

This issue is now dedicated to writing a tutorial on using subdomains + Far Futur expiration.

loparr’s picture

Hi,
Thank you. I figured it out - in mapping I put url of my subdomain. Now is it possible to restrict files that only images are served from subdomain?

Thank you

Wim Leers’s picture

#2: Yes, do something like this:

http://subdomain.yourdomain.com|.jpg .jpeg .png .gif

That's all :)

alexweber’s picture

Would it be possible to alter the URLs so that the subdomain tp map directly into sites/default/files?

So the file "http://domain.com/sites/default/files/foo/bar.jpg" would have its path altered to "http://sub.domain.com/foo/bar.jpg"?

Wim Leers’s picture

Issue summary: View changes
Status: Postponed » Closed (fixed)

Seems many people are able to figure this out on their own, so not writing a tutorial for this.