Created
November 5, 2013 15:31
-
-
Save winmillwill/7320835 to your computer and use it in GitHub Desktop.
Keep your Drupal files in s3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost> | |
# ... | |
SSLProxyEngine On | |
# Since Drupal has infinite terrible file i/o already, doing a stat before proxying and avoiding it doesn't make me feel bad | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^/sites/.*/files/(.*)$ https://s3.amazonaws.com/my.sweet.bucket.aws.bucket01/files/$1 [P] | |
ProxyPassReverse /sites/mysite.dev/files/ https://s3.amazonaws.com/my.sweet.bucket.aws.bucket01/files/ | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment