Skip to content

Commit

Permalink
When installing Nginx, enable http_gzip_static_module by default.
Browse files Browse the repository at this point in the history
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
FooBarWidget committed Apr 7, 2012
1 parent 27d52ed commit 7b45e32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -4,6 +4,7 @@ Release 3.0.12
* [Nginx] Preferred Nginx version upgraded to 1.0.14. * [Nginx] Preferred Nginx version upgraded to 1.0.14.
* [Nginx] Preferred PCRE version upgraded to 8.30. * [Nginx] Preferred PCRE version upgraded to 8.30.
* [Nginx] Fixed compatibility with Nginx < 1.0.10. * [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. * [Nginx] Fixed a memory disclosure security problem.
The issue is documented at http://www.nginx.org/en/security_advisories.html The issue is documented at http://www.nginx.org/en/security_advisories.html
and affects more modules than just Phusion Passenger. Users are advised and affects more modules than just Phusion Passenger. Users are advised
Expand Down
3 changes: 2 additions & 1 deletion bin/passenger-install-nginx-module
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
# Phusion Passenger - http://www.modrails.com/ # 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. # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
# #
Expand Down Expand Up @@ -392,6 +392,7 @@ private
def build_nginx_configure_command(prefix, extra_configure_flags = nil) def build_nginx_configure_command(prefix, extra_configure_flags = nil)
command = "sh ./configure --prefix='#{prefix}' " command = "sh ./configure --prefix='#{prefix}' "
command << "--with-http_ssl_module " command << "--with-http_ssl_module "
command << "--with-http_gzip_static_module "
command << "--with-cc-opt='-Wno-error' " command << "--with-cc-opt='-Wno-error' "
if @pcre_source_dir if @pcre_source_dir
command << "--with-pcre='#{@pcre_source_dir}' " command << "--with-pcre='#{@pcre_source_dir}' "
Expand Down

0 comments on commit 7b45e32

Please sign in to comment.