Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6214665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:55:04+00:00 2026-05-24T06:55:04+00:00

Rails 3.1 has a convenient system which can compress files into .gz files. However,

  • 0

Rails 3.1 has a convenient system which can compress files into .gz files. However, instead what I’ve done is I’ve moved all the asset files that are created with assets:precompile to a static webserver. This all works, but how can I get nginx to serve the .gz files normally?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:55:04+00:00Added an answer on May 24, 2026 at 6:55 am

    1) ensure you have Nginx > 1.2.x (to proper headers modifications) and compile with –with-http_gzip_static_module option

    2) Enable this option gzip on (to serve back-end response with gzip header)

    3) Setup assets location with gzip_static on
    (to serve all.css.gz, all.js.gz files directly)

    4) Prevent of etag generation and last-modify calculation for assets

    5) Turn on the right Cache-control to cache SSL served static assets,
    unless they will be expired once browser is closed

      location ~ ^/(assets|images|javascripts|stylesheets|swfs|system)/ {
          gzip_static on;
          expires     max;
          add_header  Cache-Control public;
          add_header  Last-Modified "";
          add_header  ETag "";
      }
    

    if you would like to get full Nginx configuration, you can see this gist on Github.

    open_file_cache helps you to cache: open file descriptors, their sizes, modification times and directory lookups, which is helpful for high load on the file system.

    UPDATE: If you are living on the edge, turn on the SPDY to boost the SSL connection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My rails app has a simple model Links which tracks all the Urls associated
Rails has the rest autho plugin which works well but is there a solution
I'm aware that Rails has a few different levels for logging, but how can
We have a Rails app that has some pages that are available to all
Rails has a nice function, ordinalize , which converts an integer to a friendly
Developing rails has become lots of fun over the year that I've done it,
I want to accomplish the same thing Rails has done, to store configurations in
Ruby on Rails has the method String#starts_with? , which is implemented in Ruby with
Rails has a very convenient uniqueness validation. ASP.NET MVC doesn't. I need to make
So it seems rails has pretty nice support for timezones, but I've run into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.