I have nginx+passenger on my vps but I think I don't have the HttpGzipModule installed, two questions:
- How to verifiy if it is installed?
- How to install it, have I to install nginx again? Is there a procedure to follow for a newbie?
I have nginx+passenger on my vps but I think I don't have the HttpGzipModule installed, two questions:
If you haven't installed nginx with some very specific configurations, then there are pretty good chances that gzip module is already installed, as it comes under the core modules and installed by default.
This command will list all the configured modules:
nginx -V
But the main thing is that, byt default it is not on. You need to put the following configuration to enable it. Use this in your ngnix config file, which usually is present at /etc/nginx/nginx.conf
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";
This should enable the gzip support in your nginx.
You can check the same by using the Firebug/curl and checking the headers and it should show something like this:
Accept-Encoding: gzip,deflate Content-Encoding: gzip