0
votes
1answer
17 views

Nginx not caching any proxied requests

I believe I've properly set up nginx to cache all requests proxied to PHP-FPM, but it's not working. Here's the "http" bit from /etc/nginx/nginx.conf: http { include ...
-1
votes
2answers
30 views

Nginx and its caching systems. Are they all the same?

I'm a bit confuse about PageSpeed, Microcaching and Memcached. Are they just different tools that do the same job? I was initially thinking in use PageSpeed with Nginx. If I do that, do I need ...
0
votes
2answers
25 views

How to prevent nginx caching blank pages?

I have nginx 1.4.3 running on a Ubuntu 12.04 machine. I have nginx set up to cache pages (they are database-driven but stay fairly static). I'm using MySQL and PHP-FPM. However, I found that I would ...
0
votes
0answers
19 views

How can I configure what to cache in nginx?

I have a REST API for which I'm using nginx as a reverse proxy. I want to cache certain calls to the API which use absolute time references in the request but I want to not cache calls which use ...
0
votes
0answers
54 views

Empty $upstream_http_location variable if response was cached

I would like to cache the response of an redirect. (Cache the request to some site which returns a redirect and cache the second request which returns the actual content.) So far my config looks like ...
1
vote
0answers
10 views

Static App, How Many concurrent connections can my basic vsp handle? [duplicate]

So I have this simple web app. What it does is simply outputting a xml file 1-3kb in size, gzipped. My current vps is a basic one, with 2 gb of ram and 2x2ghz processor power. I use centOS and nginx. ...
2
votes
1answer
214 views

How to invalidate nginx reverse proxy cache in front of other nginx servers?

I'm running a Proxmox server on a single IP address, that will dispatch HTTP requests to containers depending on the requested host. I am using nginx on the Proxmox side to listen to HTTP requests ...
0
votes
1answer
96 views

Clear nginx cache via HTTP request?

I have the usual proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=drupal:16m; proxy_cache_key "$scheme$host$request_uri"; to establish proxy caching. How should I ...
2
votes
1answer
81 views

Nginx or Varnish caching with multiple versions of a site

I have a website (https://mediacru.sh) that has a few versions. There's the normal desktop site, the same site with a dark theme, and the mobile site. They all share the same URLs. The theme is ...
0
votes
0answers
26 views

NGINX cache mis-behaving causing the system to go into a frenzy

We're using CentOS/nginx fastcgi_cache to cache requests to PHP files on our server. This file gets accessed very often and also updates very often as such it has 1s cache. Usually when looking ...
0
votes
0answers
24 views

Altering Cache value based on php response of an image or html in Nginx

I'have a set up where a PHP script dynamically creates images based on size and the device requesting them. Everything is working fine apart setting a higher cache expiry for images when they are ...
0
votes
1answer
50 views

NGINX - dynamic proxy_cache_path directory

Has anyone ever successfully configured separate cache folders for different sites?
0
votes
0answers
63 views

Force end user browser to forget old SSL - Caching & Secure Pages

Problem I recently switched the domain of my website. websiteA.com to websiteB.com (Stack: LEMP, running memcache and Varnish for caching.) I set up nginx to 403 re-direct everything and on new ...
1
vote
0answers
67 views

Nginx cache shared between multiple servers

We have 8 REST-ish API servers with Nginx using FastCGI with PHP-FPM to handle requests. We're currently using Nginx' FastCGI caching (directives like fastcgi_cache_path). This means that API ...
0
votes
1answer
197 views

How to make an existing caching Nginx proxy use another proxy to bypass a firewall?

My question is about using Nginx as a proxy behind another proxy. (Somewhat confusing.) I want to set up Nginx so it acts as a caching proxy server to an npm mirror. Here is the link: ...
1
vote
0answers
71 views

DNS/Server change causing blank page

We have recently changed servers and hosts of our test|production environment. Right now we are still testing but our http://test.example.com, is sometimes showing just a blank page to certain users. ...
0
votes
0answers
127 views

nginx wont cache images when they are read through php files

i have .php file wich is loading images to hide their location. Every images are correctly caching through this directive: location ^~ \.(jpg|jpeg|png|gif|ico|css|js)$ { expires max; ...
1
vote
2answers
30 views

When I try to cache with nginx I get 404 on resources

I googled around and found some scripts on how to cache static resources on nginx, the problem is that when I apply these scripts I get 404 on my scripts and styles. What am I doing wrong here? I'm ...
0
votes
0answers
24 views

Setup nginx to return last cached item, then update cache via proxy_cache and proxy_cache_use_stale

I am trying to setup nginx in front of a service with a significant load/warm-up time. I would like to setup the proxy_cache so that the last cached value will be returned immediately and nginx will ...
0
votes
0answers
82 views

nginx - serving stale cache response while updating

In nginx I am using the proxy_cache_use_stale updating directive (http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_use_stale) so that concurrent request to an invalidated cached ...
0
votes
0answers
244 views

Nginx + php-fpm + Zend Opcache + php 5.3.10 - Dynamic Generated CSS|JS

I have the Zend Opcache pecl extension working almost completely- except for that I have 4 files that technically are content-types of css and js - but are "php" files and get sent through fastcgi and ...
2
votes
2answers
2k views

Nginx + php-fpm - Each php-fpm process 70-100% cpu when running

I have a situation in which the following is taking place: We are on linode with 8-core, 8gb of ram , 2.6 ghz - using nginx + php-fpm - we are getting extremely high graphs of cpu usage (which we ...
0
votes
0answers
34 views

Nginx + W3 Total Cache not working

I have a Ubuntu 12.10 x64 server running Nginx + MySQL, i've installed everything and my wordpress site is perfect. But, at the moment i installed W3 Total Cache, i got an error from Minify which ...
0
votes
2answers
206 views

How do I set nginx's cache files to file permissions 777?

I'm trying to write a process that invalidates the cache on nginx (and doesn't re-warm the cache). By default, nginx has 700 on its cache files. The closest setting that I could find was: ...
0
votes
2answers
233 views

nginx: fastcgi_cache_path empty

I wanted to try fastcgi_cache on my nginx 1.5.8 setup as shown here. In nginx conf, http section, I added: fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:10m max_size=1000m ...
0
votes
1answer
134 views

nginx cache gzip file's to temp directory?

Is the following possible through Nginx: I now have gzip on; but the server needs to compress the popular files everytime, the files are xml files created through a database, but they are "static". ...
2
votes
0answers
143 views

Nginx not honoring must-revalidate

I want to use nginx as a caching reverse proxy. I also have a special requirement, which I thought could be accomplished with nginx. I am using Amazon s3 as origin server and I use signed urls to ...
0
votes
0answers
287 views

Nginx does not cache json

I have the following nginx configuration user nginx; worker_processes 10; pid /var/run/nginx.pid; events { worker_connections 1000; } http { sendfile on; tcp_nopush on; tcp_nodelay ...
0
votes
0answers
45 views

Clear NGINX cache using FTP

I have an NGINX server set-up to handle caching for a website (running elsewhere). Works like a charm, however we want to administrators to have an option to flush the cache from their backoffice. I ...
1
vote
1answer
113 views

Serving a file with an expires header depending on when it was last modified

In nginx is there a way to conditionally serve a file with different expires headers depending on when the file was last modified? For example, if foo was modified within the last week then I want it ...
1
vote
1answer
634 views

Configure nginx for max-age=0 requests

I'm using nginx as a reverse proxy with proxy_cache. The back-end is setting cache-control response headers which makes nginx serve responses from cache when possible. However I would like to allow ...
0
votes
1answer
28 views

Nginx cache to serve cached content instead of error pages

Is there any way to configure Nginx to serve cached content instead of error pages? Let's suppose that accessing a page /abc.html resulted in 200 and the page was cached. Meantime something changed ...
0
votes
1answer
128 views

Nginx save file to local disk

My case is: In our China company, we have to access one web server in USA headquarter through Internet. But network is too slow, and we download many big image files. All our developers have ...
1
vote
1answer
744 views

How do I force NGINX to load new static files?

I recently pushed a major update to a site and I'm having an issue where some people can't log in because their browser is loading old javascript files. Some of the things I have done include: Cache ...
0
votes
0answers
220 views

Nginx ignore query string for caching certain files

I know my setup is a bit crazy, but whatever.... I set up Nginx on Openshift to cache map tiles (for a map viewer, you can guess the purpose, :-) ) that are served from my home network, which has ...
0
votes
0answers
86 views

Nginx redirect to another domain if static file not found or cache/gzip

I had this code in my config file, and it worked: try_files $uri @redirect-to-main; location @redirect-to-main { rewrite ^ https://main.com$uri redirect; } Now I need to add cache/gzip ...
0
votes
1answer
301 views

Nginx and Apache, how to configure proxy_cache?

I have Nginx installed as a front end proxy for Apache, where Apache is servicing PHP and Nginx is servicing static files. I'm having a problem configuring Nginx to cache the output from PHP into a ...
0
votes
0answers
66 views

How to prevent nginx from caching certain files?

Is it possible to configure nginx to never cache certain files? I have two files on the root directory, index.html and list.json, and I want to disable caching for them completely. Can this be done by ...
-1
votes
3answers
7k views

How to clear nginx cache [closed]

My nginx config here: http://p.ngx.cc/0c This link http://aa-tour.ru/static/system/css/style.css show me old cached version of file, how to remove it and clear cache? This is correct (new) version of ...
0
votes
2answers
248 views

Skipping nginx PHP cache for certain areas of a site?

I have just set up a new server with nginx (which I am new to) and PHP. On my site there are essentially 3 different types of files: static content like CSS, JS, and some images (most images are on ...
1
vote
1answer
101 views

Selective .js cache on nginx

I have one .js file that can't be cached by the browser. Because of this file, I have this in my nginx configuration file: location ~* .(js)$ { expires epoch; log_not_found off; access_log off; } ...
0
votes
1answer
57 views

Set expires for all virtual hosts nginx

Is it possible to set expires for all virtual hosts (servers) in nginx while still filtering the filetypes? Right now I'm using location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|otf|ttf) { ...
1
vote
1answer
308 views

Ignore certain URLs on Varnish Cache

I'd like that Varnish completely ignored certain URLs on my websites. I.e., www.site1.com/fileuploader and www.site2.com/fileuploader I have 4 websites on the same VCL, and all those websites are ...
0
votes
1answer
101 views

Nginx: Cache uWSGI as accessible files

I'm still pretty new to Nginx, but I know that it serves static files very well. For this reason I want to use Nginx together with TileStache as a map server. TileStache has got a WSGI application ...
1
vote
1answer
2k views

My pages are not getting served from cache.But nginx is actually caching the files

i have set up an nginx server in ubuntu as a reverse proxy cache server.My application code resides in /var/www/myapp folder. following are the configuration i have given in server { listen ...
0
votes
1answer
527 views

how to delete single nginx cache file?

when access http://mydomain.com/ its blank but working good with http://mydomain.com/index.php i need to delete nginx cache file for http://mydomain.com/ how to do it? Here my nginx cache conf. ...
0
votes
1answer
65 views

nginx didn't cache page

I have FreeBSD server with nginx as reverse proxy. When I test it with ab util, I see some strange things, such as: Internal pages aren't cached. Main page is cached, but sometimes the non-cached ...
0
votes
1answer
399 views

Nginx ssi with proxy_cache hanging after first request

I am using Nginx's proxy cache for our dynamic pages and have recently integrated ssi. The first page load works fine but once the page is cached and another request comes through the page just hangs. ...
0
votes
1answer
392 views

How does Nginx reverse proxy cache work?

I don't understand how a reverse proxy with caching works. Let's assume that the cache is empty. User1 loads index.php (dynamic content). There's no cache, so Nginx queries the php file. The server ...
1
vote
3answers
173 views

nginx + php-fpm + varnish + ssl

I have a social networking site and because of that we want to run ssl all the time. does this defeat the purpose of using any type of cache system for even static content since everything will be ...