4

I've recently had to migrate from Django to Drupal 7 due to web server constraints. One of the aspects of my old Django setup that I would like to preserve is hosting static content like images and other media on a remote server as I have free access to a massive server for this purpose.

With Django, this was as simple as editing a line or two in the settings.py file. My search for how to do this in Drupal has so far been pretty fruitless. Can someone please suggest a relatively simple way of doing this automatically?

The website in question will have multiple contributors, most of whom will be non-technical, so this should be something that is handled automatically.

  • Did you end up figuring this out? Pretty surprised Drupal doesn't have a way to do this, as it's the first thing you'd need to do when you add a second Drupal instance to serve traffic. I've just posted drupal.stackexchange.com/questions/106638/…, would you please take a look? – user779159 Mar 14 '14 at 11:28
1

You should look into the CDN project. I am think of implementing it myself, but have no practical experience to impart.

0

I have never seen it done like you're asking for using Drupal's settings file. However I've seen people (including myself) add a rule to the Apache virtual host for your local site that automatically detects links to images and makes Apache serve the images from your web host instead of your local host. That avoids having to download the images every time.

0

CDN module does the trick. You can just give the address of remote host in CDN module configs. You can also specify which files or paths need to be serverd from your remote host (i.e CDN).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.