3 To use Stage File Proxy, you must add variables to $conf in settings.php:
10 $conf['stage_file_proxy_origin'] = 'http://example.com'; // no trailing slash
12 If the site is using HTTP Basic Authentication (the browser popup for username
13 and password) you can embed those in the url. Be sure to URL encode any
16 For a username of myusername and password letme&in the configuration would be:
18 $conf['stage_file_proxy_origin'] = 'http://myusername:letme%26in@example.com';
22 $conf['stage_file_proxy_use_imagecache_root'] = TRUE;
26 If this is true (default) then Stage File Proxy will look for /imagecache/ in
27 the URL and determine the original file and request that rather than the
28 processed file, then send a header to the browser to refresh the image and let
29 imagecache handle it. This will speed up future imagecache requests for the
32 $conf['stage_file_proxy_hotlink'] = FALSE;
36 If this is true then Stage File Proxy will not transfer the remote file to the
37 local machine, it will just serve a 301 to the remote file and let the origin
40 $conf['stage_file_proxy_origin_dir'] = 'sites/default/files';
42 Default is 'sites/default/files';
44 If this is set then Stage File Proxy will use a different path for the remote
45 files. This is useful for multisite installations where the sites directory
46 contains different names for each url. If this is not set, it defaults to the
47 same path as the local site (sites/default/files).
49 $conf['stage_file_proxy_sslversion'] = 3;
53 CURL will try to figure out which ssl version to use, but if it fails to do that
54 properly it can lead to getting an empty file and a 0 status code. The default is
55 3 which seems relatively common, but if you get 0 byte files you can try changing
61 To automatically enable stage_file_proxy on your dev machine after sql-sync,
62 add the following to your dev site alias file:
64 $aliases['dev'] = array (
65 'root' => '/path/to/drupalroot',
66 'uri' => 'http://example.org',
67 'target-command-specific' => array(
69 'enable' => array('stage_file_proxy'),
74 In order for this to work, you must copy the file
75 drush/examples/sync_enable.drush.inc to your ~/.drush folder.
76 For more informatoin, see:
78 http://drupalcode.org/project/drush.git/blob/HEAD:/examples/sync_enable.drush.inc