Report this

What is the reason for this report?

How to Rewrite home page url in Varnish

Posted on July 10, 2020

Hi, I have configured varnish with Magento 2.3.x and its working fine with the sub folders and pages. However, when I open domain.com in the browser it gives me 503 error. But domain.com/index.php/ works fine.

What I want to achieve here is I want to remove /index.php/ and let the user view from domain.com/ instead.

Now, this works absolutely fine in Nginx, I have rules in nginx and it works fine, but when I configure it with varnish i get this issue.

My nginx & varnish (default.vcl) is given below. I believe varnish is somehow rejecting domain.com.

nginx.conf: https://pastebin.com/raw/tQ9wAmEP

default.vcl: https://pastebin.com/raw/JmE5fncy

I have already made suggested changes by Magento docs i.e.

-p http_resp_hdr_len=65536 
-p http_resp_size=98304 
-p workspace_backend=98304

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.