nginx fastcgi_no_cache not working

I have set fastcgi_no_cache to 1. Which means not to cache, But, yet nginx caches it. I have to delete the cache directory every single time. Is there any way that I can disable caching for a server block?

server { listen 80; server_name example.com fastcgi_no_cache 1; fastcgi_cache off; expires off; sendfile off; rewrite ^/about-us$ /about-us.php last; rewrite ^/more-info$ /more-info.php last; rewrite ^/features$ /features.php last; }

fast cgi config

fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=DEFAULT:8m inactive=10m; fastcgi_cache_key "$scheme$request_method$host$request_uri"; fastcgi_cache_use_stale error timeout invalid_header http_500; map $request_method $no_cache { default 0; POST 1; } map $query_string $no_cache { default 1; "" 0; } map $http_cookie $no_cache { default 1; "" 0; }

Category:php Views:2 Time:2017-09-09

Related post

  • nginx rewrite not working (with passenger on Mac OS X) 2009-05-19

    I have nginx with rewriting working correctly on my server in production. But when I tried to set the same rule on my local development machine (mac) the rewrite doesn't seem to be working. I want "universitytutor.local" to redirect to "www.universit

  • Nginx Rewrite Not Working as Expected 2011-06-06

    I have the follow rule on Nginx but it does not work... rewrite ^/news/([^/]+)/([^/]+)(?:/|)$ /index.php?page=new&id=$1&$args last; I want this to be like /news/id/some-title What is wrong here...? Thank you. --------------Solutions----------

  • Nginx location not working with regex 2014-08-12

    I would like to catch all urls with this route /al/ or /ca/ etc. so www.mysite.com/ca/ or www.mysite/al/ I tried location ~ ^/([a-z]{2})/ { } but couldn't get it working, not sure how to go about the regex in a location block. Nginx wont start, but w

  • Nginx port_in_redirect not working? 2011-11-06

    I recently set up a Nginx server to host a wordpress install and am using Varnish as a reverse proxy in front of the server. Varnish is running on port 80, so I have set up Nginx to listen to 80 and redirect. Unfortunately on redirection, the port 80

  • Rails 3.2 with Passenger & Nginx: Umlaute not working in paths on production server 2012-04-02

    I'v just deployed a Rails 3.2 app on a vserver running with passenger and nginx. I tested the app in production env locally on a mac with nginx & passenger running as well. Some of my assets have german Umlaute in their filename (I'm using Paperc

  • nginx rewrite rule not working? 2010-03-29

    rewrite ^/index.asp /index.php last; rewrite ^/index.asp\?boardid=([0-9]+)$ /forum-$1-1.html last; rewrite ^/index.asp\?boardid=([0-9]+)(.*)$ /forum-$1-1.html last; rewrite ^/index_([0-9]+)(.*)$ /forum-$1-1.html last; rewrite ^/dispbbs.asp\?boardID=(

  • PHP not working with nginx on ubuntu? 2011-02-20

    Not working at all. <?php phpinfo(); ?> Returns blank. I googled for help, but still had no luck. I'm on Ubuntu 10.10, nginx/0.7.67. I used this guide to set it up. My error log has nothing useful. Does anyone have any ideas? --------------Solu

  • Rails authenticate_or_request_with_http_basic not working on SSL + Nginx 2011-04-14

    I've get an action in my Rails 3 app that I'm pw-protecting with authenticate_or_request_with_http_basic. Working fine on my development machine but it's not prompting for the http_basic user/password on the production server. The entire production a

  • Nginx gzip filter not work with my custom handler 2011-12-08

    I wrote a very simple nginx handler,just output some text (size 100B to 10KB). the code works properly with nginx( ver 1.0.6) but I found gzip filter can not work with the handler . when I turn gzip on in nginx.conf (under http section), the gzip wor

  • Nginx name based configuration not working 2012-01-02

    I have set up the Nginx +unicorn for my rails application, it is working while using server name as localhost, but not working if I set some other name: server { listen 80 default; server_name testapp www.testapp.com; access_log /var/log/nginx/localh

  • Nginx rewrite rule/try_files not working together 2012-04-12

    I have a website I need to move from an Apache server to an Nginx server. The .htaccess file of this website is as follows RewriteEngine on RewriteRule ^([^/\.]+)/?$ $1.php [L] This redirects www.example.com/hello to www.example.com/hello.php keeping

  • php script not working on NGINX 2012-09-08

    i am working on new server NGINX and facing some problem with one of php script here is the script $src = $_GET['src']; header('Content-type: image/jpeg'); //watermark.png will go in root dir watermark.php?src=test.jpg watermark.png w_test.php if (er

  • .htaccess and RewriteCond not working on NGINX 2014-05-07

    After installing Nginx admin nginxcp.com RewriteCond %{REMOTE_ADDR} !^111\.22\.111\.22 .htaccess not work Where can any IP download File server.domain.com/files/4/u9lv1n7c0mxk1m/10MBtest.zip Not seen IP in .htaccess , and file downloading, from any I

  • 'git clone' with msysGit on Windows not working 2009-09-21

    I have installed msysGit on several of my computers and only have problems on one particular computer (my main work computer of course). 'git clone' does not work. When I run the clone command on a repository, this occurs: C:\Projects>git clone gi

  • Codeigniter -> getting 404 error. Simple routes not working 2010-12-15

    I am an asp.net guy and this is the first time I've dealt with PHP. Anyhow, I've struggled to migrate an existing site to a new server. This site is using codeigniter. When I call http://mydomain/admin I get a 404 error! But if I call: http://mydomai

  • Facebook PHP SDK not working on localhost 2011-02-27

    I am planning to connect to Facebook chat from my localhost. I will need to get the session key from Facebook. When I give the site URL as localhost:8080 or ip-address:8080, it does not work. I read about setting up two apps with 2 different API keys

  • Custom :public directory in Sinatra not working 2011-04-02

    So, I've got a sinatra app I'm working on with the app hosting several different microsites for clients. The way I have my public and views directory structured is like so: sites/ site1/ public/ style.css views/ layout.haml general.haml site2/ public

  • PHP Flush() not working in Chrome 2011-05-14

    I stumbled upon this function which promised to work across IE, FF & Chrome. But it does not work in Chrome. Is there a work around? function buffer_flush(){ echo str_pad('', 512); echo '<!-- -->'; if(ob_get_length()){ @ob_flush(); @flush()

  • Thinking Sphinx min_inflex_len and delta not working on production server 2011-08-31

    We have an issue with TS min_inflex_len and delta indexes on our production servers I have everything working in development mode on OSX but when we deploy via capistrano to our Ubuntu server running passenger / apache, both delta indexing seems to s

  • nginx vhost not serving static files 2011-11-03

    server { listen 80; server_name www.site.dk; access_log /var/www/www.site.dk/logs/access.log; error_log /var/www/www.site.dk/logs/error.log; root /var/www/www.site.dk/; location / { index index.php index.html; if (-f $request_filename) { break; } if

  • Hgweb and changegroup hook not working 2011-11-26

    I'm using hgweb to publish my local repositories. /project_path/project_name/.hg/.hgrc have: [hooks] changegroup.bitbucket = hg push ssh://[email protected]/user/repo When i'm use hg serve, all changegroup hooks working fine, but when i'm using hgweb

  • nodejs socket.io demo not working well 2011-11-30

    I installed nodejs and socket.io, and when I run the demo code at http://socket.io/#how-to-use, I always get this on server: info - socket.io started debug - served static content /socket.io.js On my browser, nothing output. It seems not working well

  • playframework routes file with get parameter id and action method not working 2012-02-07

    I was looking at this example in the section "Assign static args" http://www.playframework.org/documentation/1.2.4/routes but it makes no sense as they call render(page) instead of render(id). Maybe it is not a good example for my use case...... I ha

  • My browsers, Bing and Google, do not work. '404 Not Found' 2012-04-04

    My browsers, Bing and Google, do not work. '404 Not Found', keeps popping up, everytime I try to 'Search'. Whats wrong and how do I fix this? <Original title - Browsers> --------------Solutions------------- My browsers, Bing and Google, do not

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.166 (s). 11 q(s)