Open TOMER628 opened 9 years ago
Hi, can you try :
backend default {
.host = "127.0.0.1";
...
}
Regards.
i changed that to 127.0.0.1 and i did restart to NGINX +VARNISH and after that cecked the website this my result:
Error 503 Backend fetch failed
Backend fetch failed
Guru Meditation:
XID: 3
Varnish cache server
Your server needs to listen on 127.0.0.1 to or the nginx won´t be able to resolve the request from Varnish to the correct domain.
X-Cache: cached, tells you already that the page cache (varnish is working correctly)or was lol.
That´s what you need to see, because in the default vcl they removed all "mentions" of varnish (preventing website scans from Bots for security holes for example)
And I´m not sure for what the Proxy pass is? You go through Varnish, than to nginx than to..? .. Something else?
i using VESTACP and they said (attached link) to change to ip server... https://forum.vestacp.com/viewtopic.php?f=19&t=3793
see the answer of " Ghulam " he explained what to do and this what i did...
Well, still point stands, your page was cached...
X-Cache: cached
hi !
i using your Default.vcl .. i checked in http://www.isvarnishworking.com/ website, if my varnish (4) working.. and he said " NOPE ! " how this possible ?
here my config details:
let say my server ip is :123.123.123.123
so this my configuration of Default.vcl:
backend default { .host = "123.123.123.123"; .port = "8080"; .connect_timeout = 600s; .first_byte_timeout = 600s; .between_bytes_timeout = 600s; .max_connections = 800; }
Only allow purging from specific IPs
acl purge { "localhost"; "127.0.0.1"; }
and in Nginx.conf :
server { listen 123.123.123.123:80; server_name mydomain.com www.mydomain.com; error_log /var/log/httpd/domains/mydomain.com.error.log error;
}
i think this configurated correct. so why http://www.isvarnishworking.com/ say no varnish ?
Nope! We didn't find the "X-Varnish" header in the response from the server so likely Varnish is, in fact, not working.
Shoot.
It is possible that the Varnish daemon is technically running on the server, but maybe listening on another port. It's also possible someone modified the headers in your Varnish installation - in which case you're out of luck pal!
And here, for you to ponder further, are the actual headers we received:
The url we checked: mydomain.com HTTP/1.1 200 OK Date: Tue, 06 Jan 2015 08:11:37 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive Set-Cookie: __cfduid=d235e8244a0187f446c95c59f836c4abc1420531897; expires=Wed, 06-Jan-16 08:11:37 GMT; path=/; domain=.mydomain.com; HttpOnly X-Pingback: http://mydomain.com/xmlrpc.php Link: http://wp.me/58zon; rel=shortlink Age: 42026 X-Cache: cached Server: cloudflare-nginx CF-RAY: 1a4672293c930697-EWR Content-Encoding: gzip
And the headers we sent:
Host: mydomain.com Accept: / Accept-Encoding: gzip, deflate Check another site!
regards, Tomer.