Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Host /assets/ on subdomain to increase performance


Reply

4 Posts   1351 Views

Avatar
chrisdarl

6 November 2009 at 9:19am Community Member, 33 Posts

Is there any way of hosting assets on a subdomain, to increase performance? So that for example a image I select in the admin will have the old url of

http://www.domain.com/assets/imagename.jpg

what I want,
http://assets.domain.com/imagename.jpg

Does this sound doable? Any tips appreciated

Christopher

Avatar
joern

13 May 2010 at 3:59am Community Member, 28 Posts

Hi,
have you found a solution for this?

Jörn

Avatar
cSGermany

4 September 2013 at 12:21am Community Member, 37 Posts

would be great if someone have a solution for this

Avatar
Sean

4 September 2013 at 11:44am (Last edited: 4 September 2013 11:51am), Forum Moderator, 921 Posts

The problem you'll face is the URLs for uploaded files/assets in SilverStripe don't support a subdomain the way you're wanting. You would have to modify the way the assets path is set in the framework.

If you're wanting to increase performance, specifically for static files in assets, I would look into using nginx for serving static files and proxy pass PHP requests to Apache.

Sean