Browsing articles tagged with "gzip - Admins Goodies"
Nov 27, 2012
tom

What is the best nginx compression gzip level?

I’m using nginx reverse proxy cache with gzip enabled. However, I got some problems from android applications http requests to my rails json web service. It seems when I turn off reverse proxy cache, it works ok because the response header comes without gzip. Therefore, I think the problem caused from gzip. What is the most appropriate level of gzip compression? gzip on; gzip_http_version 1.0; gzip_vary on; gzip_comp_level 6; gzip_proxied any; gzip_types text/plain text/css text/javascript [...]

Continue Reading »
Aug 30, 2012
tom

Enable gzip on Nginx

Yes, I know that there are a lot of other questions that seem exactly like this out there. I think I must’ve looked all of them. Twice. In desparation, I’m adding another in case my specific configuration is the issue. Bear with me. First, the question: What do I need to do to get gzip compression to work? I have an Ubuntu 12.04 server installed running nginx 1.1.19. Nginx was installed with the following packages: [...]

Continue Reading »
Jul 27, 2012
tom

Nginx: disable gzip on images

In my nginx conf I have which enabled gzip: gzip on; gzip_proxied any; gzip_types text/plain text/css text/javascript; gzip_comp_level 9; gzip_vary on; However this also gzips my jpeg’s which actually increases size. How can I, ideally with out using location, disable gzipping of images? Asked by Colin If you didn’t set gzip_types image/jpeg anywhere then nginx will never compress your jpegs, unless they have different content-type (like text/plain) in headers. This may be due to one [...]

Continue Reading »
Jun 29, 2012
tom

script for extracting all gzip files in linux

All of my files in my linux server converted to gzip files I need a script for extracting all gzip files (*.gz files) Asked by FTM $ find /path/to/files -name “*.gz” -print0 | xargs -0 gunzip Answered by ErikA Check more discussion of this question. Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it Print for later Bookmark in Browser Tell a friend

Continue Reading »
May 22, 2012
tom

NGINX + GZIP – Altering Vary header to include User-Agent

Currently, when nginx is set to gzip outbound content as requested by the client, the “gzip_vary on” setting will set the following header: Vary: Accept-Encoding We would like to modify this to send out: Vary: Accept-Encoding, User-Agent Is this possible? Thanks. Asked by anonymous-one The module ngx_headers_more allows you to change http headers : more_set_headers -s 200 “Vary: ” “Accept-Encoding, User-Agent”; Not tested! Answered by Yohann Check more discussion of this question. Bookmark on Delicious [...]

Continue Reading »
Apr 1, 2012
tom

Apache LocationMatch throws 500 and AddOutputFilterByType does nothing

I need to add below directives to apache. But I get 500 when I add these lines. <LocationMatch “^/assets/.*$”> Header unset ETag FileETag None # RFC says only cache for 1 year ExpiresActive On ExpiresDefault “access plus 1 year” </LocationMatch> Additionally response is not gzipped when I add: AddOutputFilterByType DEFLATE text/html text/css application/javascript application/x-javascript Apache version is: Server version: Apache/2.2.22 (Unix) App: rails 3.2 app When I checked response&request for gzip problem, I see that [...]

Continue Reading »
Mar 27, 2012
tom

Is html or php header needed for gzip?

I use gzip module of nginx to compress documents. When gzip is enabled nginx will automatically send content-ending of gzip with HTTP headers, right? Without adding any PHP header header() or HTML meta http-equiv, this works perfectly. However, I have seen on online tutorial for adding header for gzip whether by PHP or HTML meta to assist browser to process gzipped data. Is it really needed? Since I was not sure if this is needed [...]

Continue Reading »
Mar 21, 2012
tom

Why is IIS7 not compressing my static files?

I am trying to get IIS to compress jquery.js (and all other static files, but using jquery as the example here) on my localhost, but something goes wrong. The funny part is that when I look in my %SystemDrive%\inetpub\temp\IIS Temporary Compressed Files\MySiteName, I see the jquery.js file there, and its size is 24 KB. But in the browser, according to the Net tab on Firebug, the size is 69 kb. I’ve tried the following: – [...]

Continue Reading »
Mar 13, 2012
tom

Gzip mistake with directory

I accidently gzip -rv directory and now all individual files is in .gz format. How do I undo this and gunzip all .gz files within the directory? And how do I just gzip this whole directory? I tried gunzip directory/*.gz but only gunzip the files in directory/ it doesn’t gunzip directory beyond “directory”. Asked by Maca To unzip your files, do the following: find /yourdirectory -name *gz | xargs gunzip This will unzip all files [...]

Continue Reading »
Mar 4, 2012
tom

How do I most efficiently store and serve 1,000,000+ small gziped files on a Linux web server?

I have large static content that I have to deliver via a Linux-based webserver. It is a set of over one million small, gzip files. 90% of the files are less than 1K and the remaining files are at most 50K. In the future, this could grow to over 10 million gzip files. Should I put this content in a file structure or should I consider putting all this content in a database? If it [...]

Continue Reading »
Pages:12345678»