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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Host /assets/ on subdomain to increase performance


Go to End


4 Posts   2304 Views

Avatar
chrisdarl

Community Member, 33 Posts

6 November 2009 at 9:19am

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

Community Member, 28 Posts

13 May 2010 at 3:59am

Hi,
have you found a solution for this?

Jörn

Avatar
cSGermany

Community Member, 37 Posts

4 September 2013 at 12:21am

would be great if someone have a solution for this

Avatar
Sean

Forum Moderator, 922 Posts

4 September 2013 at 11:44am

Edited: 04/09/2013 11:51am

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