How to Install Varnish Cache on Your Nginx Server

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 77

  • @mady2358
    @mady2358 3 года назад +1

    I have never saw a guy like you who will teach tech in this way basically I am from India I just love you videos and your acent . Thanks for providing this type of content in future also
    Love From India

  • @snehalsonparote8293
    @snehalsonparote8293 Год назад

    Thank you so much for this step by step configuration. I have successfully
    implemented it on my local.

  • @anubhavthakur970
    @anubhavthakur970 2 года назад +1

    Hey Tony, thank you so much for the tutorial, your teaching is helping me a lot to accomplish my goal to become a System Administrator.

  • @yashpalsinghchugh5523
    @yashpalsinghchugh5523 3 года назад +5

    Hey Tony, Amazing Video. 👏🏻
    Could you Make a Tutorial on setting up Reverse Proxy with Apache + Nginx + Varnish Cache Setup and Redis from Scratch. Thank You!

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад +5

      Great suggestion! If I make these videos, they will probably be separate videos. Will definitely have something for you though

    • @MS-co1zj
      @MS-co1zj 3 года назад

      @@TonyTeachesTech Is this video already out?

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад +1

      @@MS-co1zj Here's a reverse proxy with Apache + Nginx video ruclips.net/video/1fBNOXcYHGQ/видео.html which doesn't go into Varnish, but you should be able to combine the concepts from both videos to get what you're looking for :)

  • @NagenderGiri
    @NagenderGiri 2 года назад

    I must telll you,, you've explained it welll

  • @ankitbishnoi4067
    @ankitbishnoi4067 2 года назад +1

    Hi Tony,
    Very helpful video but How would we do in case of HTTPS, please make a tutorial which can guide us for the same...

  • @4ndreLuiz
    @4ndreLuiz 2 года назад

    Good job!
    Thank you so much!
    Video quality is excellent.

  • @vladi189
    @vladi189 Год назад

    Great explanation!!!

  • @setoelkahfi
    @setoelkahfi Год назад

    Amazing! How to serve the https?

  • @ddrci88
    @ddrci88 3 года назад +1

    Could you make one video tutorial varnish + ngnix + Apache php fhp + memcached I watch your all tutorial but all is single and different software depending

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      I can do a reverse proxy video with Apache and Nginx

  • @kozark875491
    @kozark875491 3 года назад

    Super tutorial! Very illustrative! Thank you and keep goin ;)

  • @sureshkadthan4702
    @sureshkadthan4702 2 года назад

    @Tony Teaches Tech, I am new to Varnish and learning, the way you explained is awesome, simple and easy. I have a question, let us say the varnish cache is built or we tried to warm up the cache and later on the domain name or ip changed for the website, do we have to build or rewarm the cache all over again? we are doing blue/green deployment pattern, and trying to understand when the green environment becomes blue, is there a need to rebuild the cache? Assumption here is that the green environment the varnish cache already built with load testing!!! Your input is much appreciated!!

  • @DevG-zo6dl
    @DevG-zo6dl 8 месяцев назад +1

    I Have Nginx with SSL, How to setup varnish as my nginx is running on 443 port (not 80)

    • @Belladona-yj7if
      @Belladona-yj7if Месяц назад

      Hello. Have you find anything useful for setting that up cause I'm working on that too right now. Thanks!

    • @DevG-zo6dl
      @DevG-zo6dl Месяц назад

      @@Belladona-yj7ifSure, please share your email ID, and I will send you the document I prepared.

  • @peakminute
    @peakminute 3 года назад +1

    Hey, Tony, can Varnish work together with Redis?

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад +1

      I don't see why not, but I haven't personally done this myself.
      Of course, I don't see the benefit of caching the same page, but for different pages this should work.

  • @dawid_dahl
    @dawid_dahl 3 года назад

    Great tutorial. Subbed!

  • @anshbhatia3524
    @anshbhatia3524 3 года назад +1

    Hello Sir
    My magento2 website is running on ubuntu ec2
    can i follow same steps for setup varnish?

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      I think so, but I don't have expereince with magento2

  • @aliriozavarce2358
    @aliriozavarce2358 2 года назад

    Hey Tony. How can I automatically preload all my WP pages on the server-level every time the varnish cache is enabled and purged? Thank you.

  • @atulhostvideos
    @atulhostvideos 3 года назад +1

    This is actually interesting. Will it work on HTTPS sites too?

  • @ddrci88
    @ddrci88 3 года назад

    Let’s make another episode :) install memcached and redis

  • @trollflix
    @trollflix 3 года назад

    Your tutorial is amazing and very helpful. Shall we configure Nginx to accept request only from Varnish, but not anybody typing *:8080 to the url ?

  • @AkashBiswas-nd4qd
    @AkashBiswas-nd4qd 3 месяца назад

    but ssl wordpress site is nor working

  • @home-uf3tg
    @home-uf3tg 3 года назад

    Nginx is already have caching feature. do we really need Varnish? What Vanish caching provides additionally?

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      In some situations, caching with Varnish might be more favorable to Nginx caching

    • @birdbrainsolutions6112
      @birdbrainsolutions6112 3 года назад

      @@TonyTeachesTech Can you use varnish with nginx caching?

    • @TonyFlorida
      @TonyFlorida 3 года назад

      @@birdbrainsolutions6112 yes, but any given piece of content can only be served from one cache store

    • @birdbrainsolutions6112
      @birdbrainsolutions6112 3 года назад

      @@TonyFlorida Which one would you choose? If only one works I would prefer nginx, because I use Plesk. Unless you recommend Varnish
      btw, thanks for creating all the videos :)

  • @rahilahmed2524
    @rahilahmed2524 3 года назад

    is there any plugin required after this installation on wordpress site? also how can I create rules for some particular pages?

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      There is no plugin required for Varnish to work with Nginx, but there are some available. Here's what the official varnish folks recommend www.varnish-software.com/wiki/content/tutorials/wordpress/index.html

  • @theviralonly112
    @theviralonly112 2 года назад

    what about the ssl how we can install ssl ?

    • @TonyTeachesTech
      @TonyTeachesTech  2 года назад

      Here you go ruclips.net/video/ghZXFyIyK1o/видео.html

  • @rahilahmed2524
    @rahilahmed2524 3 года назад

    Can I control Varnish, the way cloudways or other hosting services control, to stop varnish and to restart varnish whenever required?

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      Technically yes, with one of systemctl start/restart/stop varnish

  • @bryanmendez1992
    @bryanmendez1992 3 года назад

    Hello, I tried to change port 8080 to 443, but I have not been successful, you could make an example with 443, thanks

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      What kind of behavior/error do you see with 443?

    • @bryanmendez1992
      @bryanmendez1992 Год назад

      @@TonyTeachesTech Hello, I tried to make a proxy_pass where I reference port 80 but I can't get it to go through varnish

  • @dimuviranga7770
    @dimuviranga7770 2 года назад

    I'm trying to develop a adaptive bit-rate VOD streaming. In this case caching can't do by traditional way using nginx. Because the user request change dynamically and according to that streaming content will change. Is there a way to develop such kind of caching for the adaptive bit rate VOD streaming?

    • @dimuviranga7770
      @dimuviranga7770 2 года назад

      If you can provide any reference, it will really helpful for me

    • @TonyTeachesTech
      @TonyTeachesTech  2 года назад

      I'm not sure. Good luck

  • @ddrci88
    @ddrci88 3 года назад

    Do you think varnish and redis will much faster work together under the Ubuntu ? I’m thinking to do lemp reverse proxy varnish and redis cache 😂

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      In some cases, redis and varnish will works wonders. A LEMP server with redis and varnish sounds like a good stack to try

  • @anilgaur2324
    @anilgaur2324 2 года назад

    Hi can you send me installation commands please

  • @lovekeshkumar4007
    @lovekeshkumar4007 3 года назад

    Can you do it over https? When trying with https things are not working.:(

  • @heyjitendra
    @heyjitendra 3 года назад

    Varnish and Redis do different things?
    Why people in comment section talking about using them both?

  • @AlirezaMirhabibi
    @AlirezaMirhabibi 4 месяца назад

    Thank you so much. I installed varnish on my server using this tutorial, but I have a question.
    Is there any administrator on 127.0.0.1:6082 for varnish ?
    I added
    sub vcl_recv {
    set req.http.Authorization = "Basic d2h5ZGlkeW91OmRlY29kZXRoaXM=";
    }
    You can set base64 username password using below command
    echo -n "username:password" | base64
    on default .vcl but when is open 127.0.0.1:6082 on my explorer nothing happened.

  • @AhsenHusnan
    @AhsenHusnan 3 года назад

    bro in my case my nginx is running on 443 how i can mange it with varnish port plz elaborate it

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      No worries, just replace 8080 with 443 in the tutorial video

    • @wnywebdevelopment8757
      @wnywebdevelopment8757 3 года назад

      @@TonyTeachesTech Varnish doesn't even show up in the netstat list when trying to do this for https on port 443. Why would you do a video of installing varnish on a non-secure port? Who doesn't use https?

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      @@wnywebdevelopment8757 use the port that meets your needs

  • @pencilprogrammer
    @pencilprogrammer 3 года назад

    cool

  • @sachintiwari2289
    @sachintiwari2289 3 года назад

    Can I use varnish with redis as well?

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      Yes, as long as they are being used for different purposes i.e. not caching the same objects

  • @maxeneterremetis3033
    @maxeneterremetis3033 3 года назад

    I’m getting Error 503 Backend Fetch Failed 😞

    • @TonyTeachesTech
      @TonyTeachesTech  3 года назад

      That's a new one for me :) No suggestions are jumping out at me in my brief research

    • @maxeneterremetis3033
      @maxeneterremetis3033 3 года назад

      @@TonyTeachesTech yeah, I think I figured it out. I had seed pro coming soon plug-in installed in all of my sub domains. Varnish doesn’t like certain plug-ins. That’s what I’ve read. Will re-install

  • @ddrci88
    @ddrci88 3 года назад

    how to close apache port 8080 :D

  • @shanmugasundaram6625
    @shanmugasundaram6625 7 месяцев назад

    you are already root.. why do you want to add sudo? lol