Skip to content
Browse files

When installing Nginx, enable http_gzip_static_module by default.

It's an optional nginx module that serves precompressed versions of static files. This is useful for the Rails asset pipeline, because the asset recompilation process already generates pre compressed files. To enable it in the nginx config add the following directive: "gzip_static on;"
  • Loading branch information...
1 parent 27d52ed commit 7b45e32c6571458432c36cafeafae5b24cfe4fa4 @FooBarWidget FooBarWidget committed
Showing with 3 additions and 1 deletion.
  1. +1 −0 NEWS
  2. +2 −1 bin/passenger-install-nginx-module
View
1 NEWS
@@ -4,6 +4,7 @@ Release 3.0.12
* [Nginx] Preferred Nginx version upgraded to 1.0.14.
* [Nginx] Preferred PCRE version upgraded to 8.30.
* [Nginx] Fixed compatibility with Nginx < 1.0.10.
+ * [Nginx] Nginx is now installed with http_gzip_static_module by default.
* [Nginx] Fixed a memory disclosure security problem.
The issue is documented at http://www.nginx.org/en/security_advisories.html
and affects more modules than just Phusion Passenger. Users are advised
View
3 bin/passenger-install-nginx-module
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# Phusion Passenger - http://www.modrails.com/
-# Copyright (c) 2010 Phusion
+# Copyright (c) 2010, 2011, 2012 Phusion
#
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
#
@@ -392,6 +392,7 @@ private
def build_nginx_configure_command(prefix, extra_configure_flags = nil)
command = "sh ./configure --prefix='#{prefix}' "
command << "--with-http_ssl_module "
+ command << "--with-http_gzip_static_module "
command << "--with-cc-opt='-Wno-error' "
if @pcre_source_dir
command << "--with-pcre='#{@pcre_source_dir}' "

0 comments on commit 7b45e32

Please sign in to comment.
Something went wrong with that request. Please try again.