Stage File Proxy
Stage File Proxy is a general solution for getting production files on a development server on demand. It saves you time and disk space by sending requests to your development environment's files directory to the production environment and making a copy of the production file in your development site. You should not need to enable this module in production.
For a full description of the module, visit the project page.
Submit bug reports and feature suggestions, or track changes in the issue queue.
Table of contents
- Requirements
- Installation
- Configuration
- Nginx compatibility
- Maintainers
Requirements
This module does not require any additional modules outside of Drupal core.
Installation
Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.
Configuration
-
Enable Stage File Proxy, either via "Extend" (/admin/modules) or via drush: $ drush en --yes stage_file_proxy
-
Configure connection to the source. This is available via the UI, at Configuration > Stage File Proxy Settings
As this module should only be used on non-production sites, it is preferable to configure this within your settings.php or settings.local.php file. Detailed descriptions of each setting, and syntax for defining the configuration in code is in INSTALL.md
Nginx compatibility
The recommended NGINX configuration for Drupal includes rewrites that bypass Drupal for 404's inside certain directories or with certain file extensions. Make the following change to your NGINX configuration:
Before
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
After
location ~ ^/sites/.*/files/ {
try_files $uri @rewrite;
}
Maintainers
- Stephen Mustgrave - smustgrave
- Greg Knaddison - greggles
- Merlin Axel Rutz - geek-merlin
- Mark Dorison - markdorison
- Baris Wanschers - BarisW
- Baris Wanschers - BarisW
- Moshe Weitzman - moshe weitzman
- Mark Sonnabaum - msonnabaum
- netaustin - netaustin
- Rob Wilmshurst - robwilmshurst