Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
s3fs-2901046
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
s3fs-2901046
Commits
34cd8c14
Commit
34cd8c14
authored
9 years ago
by
coredumperror
Browse files
Options
Downloads
Patches
Plain Diff
Clarified some passages in the README, especially the Aggregated CSS/JS section.
parent
5ebcd2b9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.txt
+21
-13
21 additions, 13 deletions
README.txt
with
21 additions
and
13 deletions
README.txt
+
21
−
13
View file @
34cd8c14
S3 File System (s3fs) provides an additional file system to your
d
rupal site,
S3 File System (s3fs) provides an additional file system to your
D
rupal site,
alongside the public and private file systems, which stores files in Amazon's
Simple Storage Service (S3) (or any S3-compatible storage service). You can set
your site to use S3 File System as the default, or use it only for individual
...
...
@@ -98,7 +98,7 @@ the S3FS Actions page (admin/config/media/s3fs/actions), though the copy
operation may fail if you have a lot of files, or very large files. The drush
command will cleanly handle any combination of files.
If you're using
NGINX
rather than Apache, you probably have a config block
If you're using
nginx
rather than Apache, you probably have a config block
like this:
location ~ (^/sites/.*/files/imagecache/|^/sites/default/themes/.*/includes/fonts/|^/sites/.*/files/styles/) {
...
...
@@ -117,13 +117,21 @@ location ~ (^/s3/files/styles/|^/sites/.*/files/imagecache/|^/sites/default/them
=================================
== Aggregated CSS and JS in S3 ==
=================================
Because of the way browsers interpret relative URLs used in CSS files, and how
they restrict requests made from external javascript files, if you want your
site's aggregated CSS and JS to be placed in S3, you'll need to set up your
webserver as a proxy for those files. S3 File System will present all public://
css files with the url prefix /s3fs-css/, and all public:// javascript files
with /s3fs-js/. So you need to set up your webserver to proxy all URLs with
those prefixes into your S3 bucket.
If you want your site's aggregated CSS and JS files to be stored on S3, rather
than the default of storing them on the webserver's local filesystem, you'll
need to do two things:
1) Enable the "Use S3 for public:// files" option in the s3fs coniguration,
because Drupal always* puts aggregated CSS/JS into the public:// filesystem.
2) Because of the way browsers interpret relative URLs used in CSS files, and
how they restrict requests made from external javascript files, you'll need
to set up your webserver as a proxy for those files.
* When you've got a module like "Advanced CSS/JS Aggregation" installed, things
get hairy. For now, that module is not compatible with s3fs public:// takeover.
S3FS will present all css files in the taken over public:// filesystem with the
url prefix /s3fs-css/, and all javascript files with /s3fs-js/. So you need to
set up your webserver to proxy those URLs into your S3 bucket.
For Apache, add this code to the right location* in your server's config:
...
...
@@ -147,7 +155,7 @@ ProxyPassReverse /s3fs-css/ https://YOUR-BUCKET.s3.amazonaws.com/YOUR-ROOT-FOLDE
* The "right location" is implementation-dependent. Normally, placing these
lines at the bottom of your httpd.conf file should be sufficient. However, if
your site is configured to use SSL, you'll need to put these lines in the
VirtuaHost settings for both your normal and SSL sites.
Virtua
l
Host settings for both your normal and SSL sites.
For nginx, add this to your server config:
...
...
@@ -256,9 +264,9 @@ thrown. If your server uses eAccelerator, it is highly recommended that you
replace it with a different opcode cache plugin, as its development was
abandoned several years ago.
=====================
=
== Acknowledg
e
ments ==
=====================
=
=====================
== Acknowledgments ==
=====================
Special recognition goes to justafish, author of the AmazonS3 module:
http://drupal.org/project/amazons3
S3 File System started as a fork of her great module, but has evolved
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment