You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across this buildpack mostly due the fact that I wanted to GZip my assets. I figured nginx would be good for this (as well as the reasons listed in your README).
Anyways, I added the default nginx.conf.erb to my config folder. Then I attempted adding the following from the Asset Pipeline Guide to the server section like this:
server {
...
location ~ ^/(assets)/ {
root /path/to/public;
gzip_static on; # to serve pre-gzipped version
expires max;
add_header Cache-Control public;
}
}
I get an application error. Here's the most important part from the logs:
nginx: [emerg] unknown directive "gzip_static" in ./config/nginx.conf
Of course, /path/to/public is just placeholder, so, as a side note, I'm wondering if this will work:
root <%= Rails.root.join('public').to_s %>
Moving forward, it seems that nginx needs to be configured with http_gzip_static_module. I'm not exactly sure how to do that or if it fits in the scope of this repo.
Does anyone have any experience with trying to GZip precompiled assets using nginx? Better way? Am I on to something we could merge in with this repo? This module seems to be configurable in other, less popular build packs I've seen around here on GitHub.
I came across this buildpack mostly due the fact that I wanted to GZip my assets. I figured nginx would be good for this (as well as the reasons listed in your README).
Anyways, I added the default
nginx.conf.erb
to myconfig
folder. Then I attempted adding the following from the Asset Pipeline Guide to theserver
section like this:I get an application error. Here's the most important part from the logs:
Of course,
/path/to/public
is just placeholder, so, as a side note, I'm wondering if this will work:Moving forward, it seems that nginx needs to be configured with
http_gzip_static_module
. I'm not exactly sure how to do that or if it fits in the scope of this repo.Does anyone have any experience with trying to GZip precompiled assets using nginx? Better way? Am I on to something we could merge in with this repo? This module seems to be configurable in other, less popular build packs I've seen around here on GitHub.
Also, this method is documented here using Passenger: http://dennisreimann.de/blog/configuring-nginx-for-the-asset-pipeline/
The text was updated successfully, but these errors were encountered: