Control Web Panel

Other => Other => Topic started by: AdventureTime on February 16, 2023, 03:24:06 AM

Title: I am not sure if Varnish is working or not.
Post by: AdventureTime on February 16, 2023, 03:24:06 AM
Hello,

I would like to ask for help, regarding Varnish.

Whenever I use this method:

Code: [Select]
HTTP: Nginx (80) --> Varnish (82) --> Apache (8181)
HTTPS: Nginx (443) --> Varnish (82) --> Apache (8181)

And follow and use this article; I see randomly generated numbers every time I refresh it.

So, what I did is use this instead,

Code: [Select]
HTTP: Nginx (80) --> Varnish (82)
HTTPS: Nginx (443) --> Varnish (82)

However, it seems that I always receive an error saying:

Code: [Select]
Error 503 Backend fetch failed
I don't understand why. I tried using a Custom Configuration per domain, yet it still does not work.

May you please help me out?

Thanks.
Title: Re: I am not sure if Varnish is working or not.
Post by: AdventureTime on February 16, 2023, 05:02:43 AM
Hello,

I would like to ask for help, regarding Varnish.

Whenever I use this method:

Code: [Select]
HTTP: Nginx (80) --> Varnish (82) --> Apache (8181)
HTTPS: Nginx (443) --> Varnish (82) --> Apache (8181)

And follow and use this article; I see randomly generated numbers every time I refresh it.

So, what I did is use this instead,

Code: [Select]
HTTP: Nginx (80) --> Varnish (82)
HTTPS: Nginx (443) --> Varnish (82)

However, it seems that I always receive an error saying:

Code: [Select]
Error 503 Backend fetch failed
I don't understand why. I tried using a Custom Configuration per domain, yet it still does not work.

May you please help me out?

Thanks.

This is the article that I am talking about: https://wiki.centos-webpanel.com/varnish-cache-test
Title: Re: I am not sure if Varnish is working or not.
Post by: overseer on March 11, 2023, 04:43:09 PM
Did you look at the HTTP headers in the source view?

Quote
The X-Varnish HTTP header allows you to find the correct log-entries for the transaction. For a cache hit, X-Varnish will contain both the ID of the current request and the ID of the request that populated the cache. It makes debugging Varnish a lot easier.