How to configure varnish cache for a domain in Plesk?

Follow

Comments

6 comments

  • Avatar
    Lanthopus X

    In the second option (Wordpress config), in step 1.1 the wrong url is posted. It should be https://support.plesk.com/hc/en-us/article_attachments/4446947540498/default.vcl instead of https://support.plesk.com/hc/en-us/article_attachments/4405703421586/default.vcl the post id is wrong which results in a 404. Therefor the wordpress varnish configuration will not be downloaded.

    0
    Comment actions Permalink
  • Avatar
    SamParis

    Stefan Yakubov

    Thank you for the post,

    Could you provide us with the instructions for a Magento 2 website?
    I can provide a staging server with a working Magento 2 if needed.

    0
    Comment actions Permalink
  • Avatar
    Stefan Yakubov

    Hello,

    Lanthopus X

    Thank you, the link was redacted.

     

    SamParis

    You can use the official Magento tools to export and adapt the varnish configuration:
    https://devdocs.magento.com/guides/v2.4/config-guide/varnish/config-varnish-magento.html

     

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

    Weird.... I am getting the following error when starting Varnish:

    Error: Could not get socket :80: Permission denied

    Though I have set all ports correctly:

    • 80 to external 32780
    • 8443 to external 32781

    I have no clue what I am doing wrong. I double checked everything and on my test server it worked. This is a new / fresh Plesk server. Grrrrr..... Going crazy here.

     

    //edit

    Well... I found the issue! It's was caused by Varnsh v7.1. That issue is bogus and causes the above issue. I compared the new server with my test server and the test server used "latest" version of Varnish, which is: varnish-7.0.2 (according to the information screen). Weird.

    0
    Comment actions Permalink
  • Avatar
    Bragi Austfjörð (Edited )

    You need to update this article so people can Include Docker IP to IP Address Banning (Fail2Ban)

     

    Go to --> Server Management / Tools & Settings / IP Address Banning (Fail2Ban) / Trusted IP Addresses / add 172.17.0.0/24 as trusted IP for the Docker.

     

    I had to do this as the server blocked the IP 172.17.0.0/24

     

    1
    Comment actions Permalink
  • Avatar
    Stefan Yakubov

    Hello, Bragi Austfjörð

    Thank you for your input. The article was updated.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request