Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable gzip in the nginx config by default #2

Open
wingrunr21 opened this issue Dec 5, 2013 · 4 comments
Open

Enable gzip in the nginx config by default #2

wingrunr21 opened this issue Dec 5, 2013 · 4 comments

Comments

@wingrunr21
Copy link

Would like to request enabling basic gzip settings/expire headers in the nginx config by default:

gzip on;
gzip_static on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_disable “MSIE [1-6].(?!.*SV1)”;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf)$ {
  expires 1w;
  access_log off;
}
@ghost
Copy link

ghost commented Feb 19, 2014

Apologies for the late response - I will incorporate gzip. I'm not too sure about expires, we could probably do it for all content due to it's static nature, what do you think?

@ghost
Copy link

ghost commented Feb 19, 2014

Hm, actually I do believe gzip is on for dokku by default (defined by /etc/nginx/nginx.conf) - does it need to be done twice / should it be done at a buildpack level?

@wingrunr21
Copy link
Author

The gzip_proxied directive should apply to the docker requests but I know when I deployed a static site to my dokku install a few months ago I was not getting gzipped requests back (I also don't believe gzip_static is enabled by default). I ended up having to specify an nginx.conf in the project repo to get gzip support.

@jgallen23
Copy link

The same is happening for me. My content is not gzipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants