Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

How to configure Envoy as a caching forward proxy with HTTP CONNECT support

Does anyone know if there's a way to configure Envoy as a caching forward proxy? I've been trying to come to a config that would do that by following the samples and documentation for: ...
Nilvap's user avatar
  • 1
0 votes
0 answers
46 views

reverse proxy shall act as a cache and provide a website under a different domain

Assume a webserver providing a language version of a website accessable under the URL http://www.website-a.com/zh-hans/some-otherstuff/index.php I want to setup a reverse proxy for one language ...
jagottsicher's user avatar
0 votes
1 answer
318 views

Share cache between multiple location blocks

Considering a nginx server with the following two locations which each serve a webapp, including some static resources and a REST API. Is there a way to cache the common resources, e.g. /proxy/host1/...
Coxer's user avatar
  • 197
0 votes
1 answer
333 views

NGINX Reverse Proxy And Cache MS Graph API

I'm building a web based company directory which has roughly 450 employees. The data source being used is the Microsoft Graph API (Azure AD). This API requires you to make a request for every employee ...
Justin's user avatar
  • 113
1 vote
1 answer
3k views

How can I know the name of the cache file created by NGINX?

Suppose I make a request, https://example.com/path1/2?v=1, and have enabled the proxy caching. How do I know the name of the cache file created by NGINX? The problem is, I want to delete the cache for ...
Suhail Gupta's user avatar
0 votes
1 answer
488 views

Forwarding request when serving from NGINX cache - Is this possible?

I have enabled caching with Nginx. I followed the official docs and it works fine. What happens is, when the request comes in for the first time, it is proxy passed to a server. The response is cached....
Suhail Gupta's user avatar
3 votes
1 answer
7k views

NGINX - Caching not working - Always MISS

I'm currently working on enabling caching on a NGINX (Reverse Proxy). With this configuration, the value of X-Proxy-Cache is always MISS. My current conf (in /etc/nginx/conf.d) : proxy_cache_path /...
Quentin Rey's user avatar
2 votes
1 answer
3k views

Is it safe to use proxy_ignore_headers Vary?

I use a Nginx server that acts like a cache/reverse proxy for my Apache origin server. I was strugling to debug high rate of cache MISS when I found that it is because the response header Vary: ...
adrianTNT's user avatar
  • 1,169
0 votes
1 answer
4k views

Alter Nginx reverse proxy cache header from Public to Private

I have an Nginx cache server getting content from an origin server, the origin server sets Cache-Control to Public so my Nginx cache server can cache the content and make less requests to origin. But ...
adrianTNT's user avatar
  • 1,169
1 vote
1 answer
1k views

set correct request host to avoid this infinite loop in nginx

I configured this nginx server for example.com and www.example.com to be a cache/reverse proxy, taking data from mysource.example.com It seems to work ok in browser, but I noticed significant google ...
adrianTNT's user avatar
  • 1,169
0 votes
1 answer
2k views

nginx mixing cached content between my different domains

I don't know if this is a bug or I am defining cache incorrectly, I have a nginx cache (reverse proxy) server that is used by 2 different domains (mydomain1.com and mydomain2.com), different content, ...
adrianTNT's user avatar
  • 1,169
1 vote
0 answers
119 views

Nginx reverse proxy ignores cache headers

I'm using nginx as a load balancer. here is the simplified version of my nginx config file. upstream myUpstream { server server1.com; server server2.com; } server{ location / { ...
Kibo's user avatar
  • 111
3 votes
1 answer
2k views

NGINX max_size and keys_zone, could not allocate node in cache keys zone

We have a very dynamic and high-traffic application and are using NGINX caching with dynamic URLS. We want to cache these URLs for repeated requests. We have run into an issue a couple times while ...
dlrust's user avatar
  • 715
3 votes
0 answers
276 views

Don't cache small responses with nginx

I am using nginx for reverse proxy with caching. And I have a backend that sometimes returns 200 HTTP code for failed requests, with just an empty set for a body. I'd like to configure nginx in a way ...
Sergey's user avatar
  • 948
0 votes
1 answer
778 views

Apache2 reverse proxy with response caching

I'm using Apache as a reverse proxy for an application running on a local port. I want to cache responses from this application in memory. So requesting the same URL frequently should give me cached ...
kontextify's user avatar
1 vote
1 answer
5k views

Multipart ranges in Nginx reverse proxy

I am trying to setup Nginx as a reverse proxy. The upstream server is serving some media files. Because of the large amount of requests for these files and also since these files are not going to ...
bytesandcaffeine's user avatar
5 votes
3 answers
2k views

NGINX Not Serving "Fast" Stale Content with proxy_cache_background_update

We are running NGINX in front of our backend server. We are attempting to enable the proxy_cache_background_update feature to allow NGINX to async updates to the cache and serve STALE content while ...
Ted Wilmont's user avatar
3 votes
1 answer
2k views

Nginx $upsteam_cache_status custom header will not appear

I am trying to debug the nginx proxy cache and to do so I need to see the $upstream_cache_status value. My config is as follows: http { ... proxy_cache_path /tmp/cache_nginx levels=1:2 ...
JimmyBanks's user avatar
0 votes
1 answer
3k views

Nginx - disable POST data caching

I noticed that when someone sends big file to Apache website proxied by Nginx, disk usage on Nginx machine goes up. It's especially noticeable when someone uploads file that is big comparing to disk ...
Lapsio's user avatar
  • 363
0 votes
1 answer
2k views

Can NGINX "proxy_cache_valid" be relative to Last-Modified instead of time received?

I've been beating my head against the wall trying to get live DASH and HLS video streams to be cached correctly by an NGINX caching HTTPS reverse-proxy server. My current thinking is that my main ...
BobC's user avatar
  • 129
1 vote
1 answer
3k views

How to run multiple NGINX instances for servers to be developed together but deployed separately

I'm an NGINX beginner who is building both an adaptive live video server (HLS & DASH) and a caching HTTPS reverse proxy server. While the servers will be deployed to separate boxes, I'd like to ...
BobC's user avatar
  • 129
2 votes
0 answers
2k views

Can't get nginx caching to works over https reverse proxy

As title, i can't get nginx caching to works on mine reverse proxy. Here is mine nginx's server block configuration: proxy_cache_path /opt/cache/nginx/cache2.xxx.net levels=1:2 keys_zone=test_zone:...
Andrew's user avatar
  • 21
4 votes
2 answers
27k views

NGINX proxy default cache time with Cache-Control and no expiration

I have caching enabled on an NGINX proxy. As I understand it, as long as I'm not ignoring the Cache-Control header in my proxy configuration (proxy_ignore_headers), the cache time before expiration ...
dlrust's user avatar
  • 715
2 votes
2 answers
1k views

Deleting key in Nginx cache and Backend database in the same request

I am using the open source Nginx as the web server with Proxy_cache. I have a unique usecase of deleting the key in cache as well as pass the request to the backend servers to delete the key in DB ...
dv3's user avatar
  • 31
9 votes
3 answers
22k views

Debugging Nginx Cache Misses: Hitting high number of MISS despite high proxy valid

My proxy cache path is set to a very high size proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=staticfilecache:180m max_size=700m; and the size used is only sudo du -sh * 14M cache ...
Quintin Par's user avatar
  • 4,443
1 vote
0 answers
369 views

Forcing serving stale content with Nginx

I already have a Nginx server configured as caching reverse proxy. I need to configure it so that: it serves stale content disregarding any HTTP headers it received from the origin server (cache-...
Lucio Crusca's user avatar
0 votes
1 answer
5k views

How can I force to cache requests that have "Cache-Control: no-cache" in nginx when using a reverse proxy and it responds with 404?

The upstream server is sending a 404 with a header of Cache-Control: no-cache. Due to this, nginx is not caching the request. How can I force it to cache the request? This caching is only required ...
Chris Stryczynski's user avatar
2 votes
3 answers
6k views

Nginx as reverse proxy not caching

I'm trying to configure Nginx as a caching reverse proxy. The origin server is Apache and it hosts a WordPress instance, if that matters. The reverse proxy functionality is working as expected, but ...
Lucio Crusca's user avatar
2 votes
1 answer
4k views

Nginx automatically deletes cache which is set to be valid longer?

I set up a Nginx reverse proxy server serving mp4 files hosted on another server. Everything is working fine now except the cache. Although I have proxy_cache_valid set to 1 day (proxy_cache_valid ...
David Tran's user avatar
2 votes
0 answers
1k views

How can I match proxy_cache_key in nginx with the path in proxy_pass if multiple slashes are used?

I'm receiving request in the form http://host.example/foo/ or http://host.example/foo// The requests are send to a backend server with proxy_pass http://backend; and cached with the key ...
nedt's user avatar
  • 121
0 votes
0 answers
818 views

NGINX, proxy cache and dynamic URI

I have a NGINX reverse proxy that sits in front of a node.js server (express). With a pretty basic configuration. The problem I'm running into is with NGINX's proxy caching feature. Here's the setup. ...
Snarf's user avatar
  • 111
1 vote
2 answers
3k views

nginx cache without upstream / backend

I know, nginx can act as a reverse proxy to cache files if provided with a backend. The thing is, I already use nginx as a web-server, serving files (statics and php), and I want to know if it's ...
Totot Titi's user avatar
0 votes
1 answer
279 views

Prevent Squid from caching on a specific path

I'm using this rule in /etc/squid/squid.conf acl DenyApp urlpath_regex /app/path1/path2 no_cache deny DenyApp It's working great. However, what I would like to happen is for Squid to still cache /...
devwannabe's user avatar
1 vote
1 answer
3k views

Nginx - Conditionally serve WebP when nginx is setup as reverse proxy

Trying to conditionally serve WebP images in browsers that accept that mime type. Not being very familiar with nginx, I'm having issues implementing a known solution into my existing default host ...
jessback's user avatar
1 vote
1 answer
2k views

Varnish not working with last-modified

I'm new to Varnish and to reverse proxies in general. I'm testing Varnish in an application that works like a blog where I have a page with an "updated_at" that changes once the page is updated. As a ...
unadivadantan's user avatar
1 vote
2 answers
6k views

Handling caching with NGINX when cookies are being set by the server

I've had very good performance results using NGINX microcaching. However, I'm still not sure how to best handle server responses that have the Set-Cookie header. Can responses from the origin server ...
luqo33's user avatar
  • 367
1 vote
1 answer
729 views

On multiple request to Squid, send a single request to a backend and queue other requests on miss

I would like to protect a backend server by having Squid send a single request to a the server when there is a cache miss for a resource. During the fetching, other requests should be put on hold ...
Jaap's user avatar
  • 111
6 votes
1 answer
6k views

Why is my nginx reverse-proxy not caching anything?

I'm following this sample configuration from the Nginx docx. Reverse-proxying works fine except that it isn't caching results. Here is my nginx.conf: user http http; worker_processes 1; events { ...
usermynut's user avatar
1 vote
0 answers
1k views

Squid reverse proxy not able to cache

Not able to cache anything with squid reverse proxy, running in centOS6.5 squid.conf http_port 81 accel defaultsite=example.com:8080 no-vhost cache_peer example.com.ip.address parent 8080 0 no-...
ZeTradr's user avatar
  • 13
0 votes
0 answers
117 views

Cache domain GET requests using Squid

I'm trying to cache requests to remote package repository, so I can access it without internet connection. All calls are via http GET to remote repo. iptables entry to redirect requests to proxy ...
PsychoX's user avatar
  • 185
1 vote
1 answer
865 views

NGINX not caching content

I hope anyone can throw a bit of light in here since I'm stuck in the dark :-P Basically, I'm trying to make a Reverse Proxy NGINX cache content. Reverse proxying works OK, but the caching part... ...
lgg's user avatar
  • 151
-1 votes
1 answer
327 views

What's the best way to cache a website on nginx server with SSL?

I have a wordpress blog which runs using nginx (SSL) + PHP-FPM + MySQL. I wondered what was the best way to cache this kind of site. I heard that Pound and Varnish do that well, but I haven't found ...
Mehdi's user avatar
  • 103
2 votes
0 answers
743 views

Is this an nginx proxy_cache bug?

I have a very simple proxy config: http { proxy_cache_path /var/www/cache levels=1:2 keys_zone=s3-images-cache:50m inactive=1M max_size=1000m; proxy_temp_path /var/www/cache/tmp; server {...
Denis Pshenov's user avatar
0 votes
0 answers
231 views

Odd Nginx issue displaying latest version of site

We're running Nginx 1.6.2 and setup as a load balancer (using proxy) along with our backend servers. Noticed the other day, when I make updates on backend servers the changes are NOT visible to web ...
Aaron's user avatar
  • 183
0 votes
0 answers
904 views

Setting proxy_cache_bypass on NGINX only for HTML Content

We are currently using proxy_cache_bypass directive on NGINX to bypass caching when a cookie is set. This is our code: proxy_cache_bypass $cookie_user; However, we only want the server to bypass ...
Ted Wilmont's user avatar
2 votes
0 answers
449 views

Nginx proxy_cache / Varnish - parallel requests trigger multiple requests to backend?

I am looking for a HTTP reverse proxy that will handle HTTP live streaming use cases in a performant manner. Assume file/fragment sizes up to 4MB with a constant load of client requests for the same ...
user1661898's user avatar
5 votes
2 answers
10k views

Nginx reverse proxy in nested locations

I'm using Nginx as a reverse proxy for multiple applications in multiple servers and I'm trying to add common cache directives to static files of each application. My original configuration is ...
Jose Antonio's user avatar
-1 votes
1 answer
208 views

Control files fetched from upstream when using nginx proxy cache

we have a file sharing site in a local network and we trying to save links bandwidth usage to the max by caching static files in local nodes powered by nginx with caching enabled. Everything works ...
Ali Alnakeab's user avatar
0 votes
1 answer
2k views

NGiNX Custom Cache param based on regex match

My question(s) are as follows: How do I set custom variables based on regexp against a useragent? How do I set custom headers for the reverse-proxy request? How do I use these values as caching ...
Tracker1's user avatar
  • 293
2 votes
1 answer
1k views

Does Nginx respect maxage from upstream server?

I see the proxy_cache_valid directive, but that confuses me. In HTTP, doesn't the upstream server specify this with Cache-Control and maxage? How do I get Nginx's cache to use maxage ?
Paul Draper's user avatar