On October 19, 2021, we have enabled single-sign-on for our Plesk Support Center to provide a seamless login/account experience. This implies that you’ll be able to use a single account across any of our web-facing properties.
If you had already registered your account at Plesk 360 (formerly known as My Plesk) please use one for login. Otherwise please re-register it using the same email address as your existing Zendesk login (support account). It’s essential that you use the same email address on our support center to ensure that your tickets stay attached to the same account.

Does Plesk support Varnish?

Follow

Comments

12 comments

  • Avatar
    Michel vd Lingen

    A tutorial that is over 4 years old. How about really creating a good (and new) tutorial for Varnish 6.x?

    There are a lot of requests and mostly they are made by people who understand the power of Varnish. It's way better than Apache + Nginx. Especially considering software like Wordpress and Magento are becoming more and more heavy. With Varnish Plesk could make a leap forward.

    Recently more and more nonsense are added to Plesk. Why not take your users seriously and simply add Varnish support? So either give us an updates (and good) tutorial for Varnish 6.x or simply add Varnish support to Plesk. After 4 years something needs to be done imho!

    Also I see almost 700 feature votes for Varnish on Plesk User Voice, but still nothing. I have seen "useless" stuff (sorry to say) being added with far less votes. So make Plesk (much) better and add Varnish or at least update the tutorial for it...

    Plesk is starting to run behind (especially since it's considered a premium product, with a premium price). DirectAdmin is really catching up. Heck, you can install and get Varnish working on DirectAdmin within 5 minutes. And it only takes a few lines of code. So terribly disappointing that Plesk cannot do this; that or they are simply unwilling...

    2
    Comment actions Permalink
  • Avatar
    Poonyalid Penpargkul

    I need Varnish Cache on Plesk for Windows.

    0
    Comment actions Permalink
  • Avatar
    Michel vd Lingen

    Bumping this thread as a reminder to take some action.

    0
    Comment actions Permalink
  • Avatar
    Michel vd Lingen (Edited )

    And another bump.
    Bump for V-A-R-N-I-S-H!

    0
    Comment actions Permalink
  • Avatar
    Michel vd Lingen

    Bump!!

    0
    Comment actions Permalink
  • Avatar
    Michel vd Lingen

    Thank you for the updated tutorial!

    0
    Comment actions Permalink
  • Avatar
    Leonid Gukhman

    Hi Michel vd Lingen, we have updated the article, adding the SEO-safe HTTP to HTTPS redirect for WordPress.

    1
    Comment actions Permalink
  • Avatar
    Michel vd Lingen (Edited )

    Leonid Gukhman

    I finally had some time for this, thank you for the updated tutorial.
    However it doesn't work for me. Probably doing something wrong.

    First; I got an internal server error (nginx) and apparently the Varnish (in Docker) died? So I restarted it there.
    Now I am getting:

    Error 503 Backend fetch failed

    Backend fetch failed

    Guru Meditation:

    XID: 24

    Will test a few things more in the meantime.

    Okay after rebooting the server I am getting again the first error:

    502 Bad Gateway


    nginx


    Seems Varnish died again :S

    Debug: Version: varnish-7.0.0 revision 454733b82a3279a1603516b4f0a07f8bad4bcd55
    Debug: Platform: Linux,3.10.0,x86_64,-junix,-smalloc,-sdefault,-hcritbit
    Debug: Child (20) Started
    Info: Child (20) said Child starts
    Error: Manager got SIGTERM
    Debug: Stopping Child
    Info: Child (20) ended
    Info: Child (20) said Child dies
    Debug: Child cleanup complete
    Info: manager stopping child
    Info: manager dies


    I guess this shouldn't happen, right?
    I will check more in the meantime (when I have some spare time).

    0
    Comment actions Permalink
  • Avatar
    Michel vd Lingen (Edited )

    Apparently more people have had these issues given the amount of (older) comments on the blog article from Plesk. :S
    See: https://www.plesk.com/blog/product-technology/varnish-wordpress-docker-container/#comment-97932
    (and below)

    So I am not the only one. ;-)

    Also this was the exact same issue I also had with the old blog article with the old Varnish version. I thought these issues would have been resolved with an updated blog article. I guess not. :S

     

    Okay, an update. Apparently the commands from the blog (and here) do not work:

    docker ps | grep varnish | awk {'print $1'} | xargs -i docker exec -t {} sed -i '/.port/c\ .port = "7080";' /etc/varnish/default.vcl

    docker ps | grep varnish | awk {'print $1'} | xargs -i docker exec -t {} sed -i '/.host/c\ .host = "203.0.113.2";' /etc/varnish/default.vcl

    As I just checked the Varnish configuration within Docker and it still shows:


    # Default backend definition. Set this to point to your content server.
    backend default {
    .host = "127.0.0.1";
    .port = "8080";
    }


    No wonder that this does not work... After changing it when logged in Docker it seems to work.

    0
    Comment actions Permalink
  • Avatar
    Michel vd Lingen

    Also having issues with the 2nd part (for Wordpress).

    I disabled: Permanent SEO-safe 301 redirect from HTTP to HTTPS
    I enabled: SSL/TLS support
    I added the "Additional directives for HTTP"-stuff

    And yes, I downloaded the modified .vcl file and changed it to my IP.
    When I open the page I am getting an error in Dutch (Website is forwarding correctly or something) in Firefox. In Chrome something similar but also with the error: ERR_TOO_MANY_REDIRECTS

    I do not have a .htaccess file. I have no clue where to look, but I think the current manual is not that good. Seems it has quite a few flaws and a lot "if's".
    Anyways, I am done with this for today....

    0
    Comment actions Permalink
  • Avatar
    Michel vd Lingen (Edited )

    Okay, I gave it one more try by rebooting the complete server. Seems that helped?
    So probably something off with the commands for restarting Docker?


    Seems to be working now as expected:

    1. server:
      nginx
    2. vary:
      Accept-Encoding
    3.  
      via:
      1.1 varnish (Varnish/7.0)
    4. x-cache:
      HIT
    5. x-powered-by:
      PleskLin
    6. x-varnish:
      23 32774

    But maybe re-check the tutorial?

    0
    Comment actions Permalink
  • Avatar
    Stefan Yakubov

    Hello, Michel vd Lingen

    Commands and the whole scenario were tested a number of times in both RedHat and Debian-based OS. As you've confirmed it also worked in your environment as well, eventually.

    Please, check if all the steps are followed correctly. Otherwise, if there is a specific use case that prevents some steps from executing properly under certain circumstances, please let me know, so I'll be able to improve the article with additional information.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request