-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.txt
86 lines (62 loc) · 2.69 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
STEPS TO INSTALL:
=========
1. Enable the module.
$ drush pm-download stage_file_proxy
$ drush pm-enable --yes stage_file_proxy
2a. Set variables with drush:
$ drush variable-set stage_file_proxy_origin "http://www.example.com"
OR
2b. Add variables to $conf in settings.php:
REQUIRED:
=========
The origin website.
$conf['stage_file_proxy_origin'] = 'http://example.com'; // no trailing slash
If the site is using HTTP Basic Authentication (the browser popup for username
and password) you can embed those in the url. Be sure to URL encode any
special characters:
For example, setting a user name of "myusername" and password as, "letme&in" the
configuration would be the following:
$conf['stage_file_proxy_origin'] = 'http://myusername:letme%[email protected]';
OPTIONAL
========
$conf['stage_file_proxy_use_imagecache_root'] = TRUE;
Default is TRUE.
If this is true (default) then Stage File Proxy will look for /imagecache/ in
the URL and determine the original file and request that rather than the
processed file, then send a header to the browser to refresh the image and let
imagecache handle it. This will speed up future imagecache requests for the
same original file.
$conf['stage_file_proxy_hotlink'] = FALSE;
Default is FALSE.
If this is true then Stage File Proxy will not transfer the remote file to the
local machine, it will just serve a 301 to the remote file and let the origin
webserver handle it.
$conf['stage_file_proxy_origin_dir'] = 'sites/default/files';
Default is 'sites/default/files';
If this is set then Stage File Proxy will use a different path for the remote
files. This is useful for multisite installations where the sites directory
contains different names for each url. If this is not set, it defaults to the
same path as the local site (sites/default/files).
$conf['stage_file_proxy_sslversion'] = 3;
Default is 3.
CURL will try to figure out which ssl version to use, but if it fails to do that
properly it can lead to getting an empty file and a 0 status code. The default
is 3 which seems relatively common, but if you get 0 byte files you can try
changing it to 2.
DRUSH USERS
===========
To automatically enable stage_file_proxy on your dev machine after sql-sync,
add the following to your dev site alias file:
$aliases['dev'] = array (
'root' => '/path/to/drupalroot',
'uri' => 'http://example.org',
'target-command-specific' => array(
'sql-sync' => array(
'enable' => array('stage_file_proxy'),
),
),
);
In order for this to work, you must copy the file
drush/examples/sync_enable.drush.inc to your ~/.drush folder.
For more information, see:
http://drupalcode.org/project/drush.git/blob/HEAD:/examples/sync_enable.drush.inc