2

We have configure varnish in Magento 2.4.5. Backend configure some as given below Screenshot.

but in frontend not show "X-Magento-Cache-Debug:MISS/HIT".

Frontend:- https://i.imgur.com/YDnDhAb.png

anyone idea of above issue?

1 Answer 1

0

It does not make sense for your Magento backend to listen on port 80, because that's the port that Varnish is going to listen on.

The fact that this does not result in an error makes me suspect that Varnish isn't properly listening on port 80.

Once you can assure that Varnish is properly configured, could you attach the output of the following command to your original question?

sudo varnishlog -g request -q "ReqUrl eq '/'"

This command will print logging output for incoming Varnish requests for the homepage. Make sure you enabled debug mode in Magento, otherwise the X-Magento-Cache-Debug header will not appear in your response headers.

2
  • Thank you.we have run you providing command in site,but not any out put of this command. Please check Screenshot. -i.imgur.com/vlpaLiy.png we also check debug mode is enable in site. After that we run given below command. Command:- varnishlog -g request -q "ReqUrl eq '/health_check.php'" and this given below Screenshot error. - i.imgur.com/det9FfZ.png have You any other solution for this issue? May 31, 2023 at 13:24
  • The screenshot provides an indication, but not the full picture. Can you please share the complete output of the log transaction. Preferably as a code block in your original question. Please also provide the full varnishd runtime parameters. If you're running varnishd via systemd, the systemd unit file is good enough. This extra context will help me better understand the issue. May 31, 2023 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.