This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1]
1
CentOS 7 Problems / Re: Help !!!! How to configure Magento 2 With CWP
« on: January 21, 2021, 02:06:47 AM »
Hi, I just copy my default.vcl first lines, I am using nginx, varnish and apache, I hope It helps someone:
# VCL version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 5
vcl 4.0;
import std;
# The minimal Varnish version is 5.0
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'
backend default {
.host = "youripaddress";
.port = "8181";
.first_byte_timeout = 600s;
# .probe = {
# .url = "/pub/health_check.php";
# .timeout = 2s;
# .interval = 5s;
# .window = 10;
# .threshold = 5;
# }
}
######
include "/etc/varnish/backends.vcl";
include "/etc/varnish/conf.d/vhosts.conf";
#######
acl purge {
"youripaddress";
}
sub vcl_recv
{ include "/etc/varnish/sites.vcl";
{
if (req.method == "PURGE") {
if (client.ip !~ purge) {
return (synth(405, "Method not allowed"));
}
# To use the X-Pool header for purging varnish during automated deployments, make sure the X-Pool header
# has been added to the response in your backend server config. This is used, for example, by the
# capistrano-magento2 gem for purging old content from varnish during it's deploy routine.
if (!req.http.X-Magento-Tags-Pattern && !req.http.X-Pool) {
return (synth(400, "X-Magento-Tags-Pattern or X-Pool header required"));
# VCL version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 5
vcl 4.0;
import std;
# The minimal Varnish version is 5.0
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'
backend default {
.host = "youripaddress";
.port = "8181";
.first_byte_timeout = 600s;
# .probe = {
# .url = "/pub/health_check.php";
# .timeout = 2s;
# .interval = 5s;
# .window = 10;
# .threshold = 5;
# }
}
######
include "/etc/varnish/backends.vcl";
include "/etc/varnish/conf.d/vhosts.conf";
#######
acl purge {
"youripaddress";
}
sub vcl_recv
{ include "/etc/varnish/sites.vcl";
{
if (req.method == "PURGE") {
if (client.ip !~ purge) {
return (synth(405, "Method not allowed"));
}
# To use the X-Pool header for purging varnish during automated deployments, make sure the X-Pool header
# has been added to the response in your backend server config. This is used, for example, by the
# capistrano-magento2 gem for purging old content from varnish during it's deploy routine.
if (!req.http.X-Magento-Tags-Pattern && !req.http.X-Pool) {
return (synth(400, "X-Magento-Tags-Pattern or X-Pool header required"));
Pages: [1]