How to Configure Server-Level Cache on Nginx (basic example)

preview_player
Показать описание
Learn how to implement Nginx server-level caching in this tutorial that will walk you through a basic example of how to configure the proxy_cache and proxy_cache_path directives.

Check out my vlog channel @TonyFlorida

#nginx #cache
Рекомендации по теме
Комментарии
Автор

The best, shortest, most succinct illustrated explanation on how to setup nginx web cache proxy. Thank you!

Dr_Dude
Автор

Thanks. Sometimes I just get tired of having to read through a mountain of man pages to get started. Glad you posted this up

davidsun
Автор

Thank you, Tony! I was feeling ambiguity around the process of configuring Nginx for this, but you have reaffirmed how simple it can be from the Nginx documentation. This video helped me make huge gains for a system design project at a programming school. Blessings to you!

tfn
Автор

Hello from Costa Rica. This is amazing. You explained so detailed and clear and straigforward. Huge thanks

vargasbj
Автор

Great video my brother, keep up the clean work

dubeayiokorie
Автор

Your way of explanation is extra ordinary awesome.

nomanjaved
Автор

This tutorial is more than awesome! Thanks bud. What happens if the server at 8000 is dead, will the client still get a copy of the site since it's cached?

datajunkie
Автор

Hey Tony! Great video explaining how the CDN words on NGINX. I would like to ask you how all this configuration would work in secure mode (SSL) port 443 rather than in port 80?

marcioslsouza
Автор

Thank you so much for sharing your time and expertise with us Tony. Much appreciated. How would you apply this caching method to Nginx when it is being used as a reverse proxy for multiple sites. Eg. your YT video on multiple Wordpress sites. Have a good one!

PeterBatah
Автор

Caching doesn't seem to work in Django projects, can you make a video on how to achieve it? I don't think you will be able to do it imo.

LryuzakiLN
Автор

Thanks for your tutorial, but I want to cache video for faster serving on my server, is it possible without using CDN ? (because it's kinda expensive)
Is there any way to cache video like ready for serving for any visitor visit a video URL (.mp4 URL) that been already cached on server ?

NoCommunists
Автор

thnx

I was wondering since I have an nginx server (let's name it "haha") already running for HLS & DASH streaming and don't want to mess it up, is there a way to use another server for caching?

So someone is watchign a live stream from "haha" can I have this stream also cached?

IosifHamlatzis
Автор

Hi Tony... video is very informative and covers basic caching. I have a query, while setting up the cache, you made the configuration to cache anything. So if I want to cache a specific image or web page, in that case how would I configure. Thanks in advance.

aniketshinde
Автор

Thanks for the informative video. Question(s): 1. Can this cache be used for Json data as well? How do we make sure that nginx does not get confused with the auth tokens that keep changing with every request? 2. When it comes to the static content that is living on the same physical box, how does the caching server make it faster?

ramguntha
Автор

Thanks a lot Toni bro. Can you pls how to configure lscache on openlitespeed server for non wordpress sites? Happy new year bro.

RaviKumar-fxdz
Автор

Hi, your video is so easy to understand. I am new in nginx. I am trying to learn nginx by watching your video. I have an another question. Can you make any video for VOD Streaming Cache server? like, i want to make a cache server for mp4 file. also i want to know about cache file size? if main file size 1 gb then what will be the cache file size? Thanks.

livetvuhddotcom
Автор

Will it be functional in caching like squid proxy?

merkava
Автор

very productive. thankyou for such great content. I have a small question. If I am looking to serve static content (js, css, png, gif, etc) and couple of REST API dynamic PHP calls as well, and say i have to serve these static assets at the same time to 20, 000 concurrent users, will this approach to add cache server in front of a origin nginx server, will that be helpful, if so to what extent?

motidana
Автор

x-proxy-cache response header isn't showing in network tab in dev tools. My setup is nginx and gunicorn django web app.

sheriffcrandy
Автор

Amazing, but none of my cache files are getting written and therefore I'm getting no cache hits.

Any idea why? This is using a nginx proxy with proxy_pass, and using proxy_ssl_session_reuse (these are the only differences I can see)

JustinAvery