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 3957776
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:31:58+00:00 2026-05-20T02:31:58+00:00

When I go an action on the website, say signup or create a record,

  • 0

When I go an action on the website, say signup or create a record, nginx renders the cached version of page before the action, however when I refresh I see the right page.

I’ve got latest passenger running with nginx with conf:

pid /opt/nginx/logs/nginx.pid;
# Run as the nginx user
user root;
worker_processes 2;

error_log /opt/nginx/logs/error.log notice;

events {
  worker_connections 1024;
  use epoll;
}

http {
  server_names_hash_bucket_size 64;
  # More Linux performance awesomeness
  tcp_nopush on;
  tcp_nodelay off;

  # Where to store the body of large client requests on disk
  # NGINX will stream this to disk before posting it to your Mongrels,
  # preventing slow clients tying up your app.
  client_body_temp_path /var/spool/nginx-client-body 1 2;

  # Max size of a request from a client (usually a POST). This will
limit
  # the size of file uploads to your app
  client_body_buffer_size 8k;
  client_header_buffer_size 1k;
  client_max_body_size 1k;
  large_client_header_buffers 4 8k;

  ## Timeouts
  client_body_timeout 5;
  client_header_timeout 5;
  keepalive_timeout 5 5;
  send_timeout 5;

  ## General Options
  ignore_invalid_headers on;
  limit_zone carboncal $binary_remote_addr 1m;
  recursive_error_pages on;
  sendfile on;
  server_name_in_redirect off;
  server_tokens off;

  # passenger loading stuff
  passenger_root
/usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2;
  passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p136/ruby;

  include /opt/nginx/conf/mime.types;
  default_type application/octet-stream;

  ## Compression
  gzip on;
  gzip_buffers 16 8k;
  #compression level between 1 and 9
  gzip_comp_level 9;
  gzip_http_version 1.0;
  gzip_min_length 0;
  gzip_types text/plain text/html text/css image/x-icon image/bmp application/x-javascript text/xml application/xml application/xml+rss text/javascript ;
  gzip_vary on;
  gzip_proxied any;
  # Some version of IE 6 don't handle compression well on some mime-types, so just disable them
  gzip_disable "MSIE [1-6].(?!.*SV1)";


  # Send along useful info to the mongrels
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Host $http_host;
  proxy_redirect off;
  proxy_max_temp_file_size 0;

  ## Log Format
  log_format main '$remote_addr $host $remote_user [$time_local] "$request" '
                    '$status $body_bytes_sent "$http_referer" "$http_user_agent" "$gzip_ratio"';


  access_log /opt/nginx/logs/access.log main;

  # virtual hosting
  server {
    access_log /opt/nginx/logs/test_server.access.log main buffer=32k;
    error_log /opt/nginx/logs/test_server.error.log info;
    expires 6h;
    listen 80 default rcvbuf=64k backlog=128;
    root /opt/apps/website/public;
    server_name website.com www.website.com;
    passenger_enabled on;
if (-f $document_root/system/cache/$uri/index.html) {
  rewrite (.*) /system/cache/$1/index.html break;
}

if (-f $document_root/system/cache/$uri.html) {
  rewrite (.*) /system/cache/$1.html break;
}
  }
}

I’m guessing the problem has to do with rewrites. I’ve tried various rewrite rules, but still nothing.

  • 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-20T02:31:58+00:00Added an answer on May 20, 2026 at 2:31 am

    This is what I would expect to happen. Unless I am wrong (I could be it’s been a long time since I looked at an Nginx config) your config is setting the expires header to 6 hours.

    I suspect the refresh is just forcing the page to download the non cached version. You probably only want to cache the public content for 6 hours.

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

Sidebar

Related Questions

Let's say that, theoratically, I have a page / controller action in my website
Let's say I want to create a website that contains one page. All the
Say a user is browsing a website, and then performs some action which changes
I see the More Action drop-down box in gmail inbox page. It has levels
Let's say i have a form <form action=delete_post.php method=post>...</form> on my website: http://mysite.com and
when they say the action controller in the struts framework is multi threaded, does
I have a CustomeAuthorize action filter that forwards the user to signin page if
i am making a history page for a website. The structure of my classes
Working on a project that has a website and a Facebook page. They both
I'm currently developing an additional page to an already existing website. Actually that part

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.