From guillaume at varnish-software.com Mon Feb 1 08:49:35 2016 From: guillaume at varnish-software.com (Guillaume Quintard) Date: Mon, 1 Feb 2016 09:49:35 +0100 Subject: Catch /js on all domains and rewrite the host In-Reply-To: References: Message-ID: Hi Matt, would something like that do: sub vcl_recv { if (req.url ~ "^/js/") { set req.http.host = "subdomain.domain.tld"; } } ? -- Guillaume Quintard On Sun, Jan 31, 2016 at 6:31 PM, Matt . wrote: > Hi All, > > I'm fuguring out how I can accomplish the following: > > I have subdomain.domain.tld but as this is a rewrite the olders like > /js are not directly available on it. > > As my subdomains .domain.tld are dynamic I wonder if I can catch /js > from reg.url for all incoming host(requests) and rewrite it to a > source folder on another host so it can be served on: > > subdomain.domain.tld/js > > My script lookups /js/whatever.js which is needed for these libs. > > Is there some catchall technique to accomplish this ? > > Thanks! > > Matt > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From georgi.int at gmail.com Mon Feb 1 12:13:43 2016 From: georgi.int at gmail.com (georgi.int at gmail.com) Date: Mon, 1 Feb 2016 14:13:43 +0200 Subject: junk after gzip encoding In-Reply-To: <56A74950.3030700@gmail.com> References: <56A74950.3030700@gmail.com> Message-ID: <56AF4BF7.1080305@gmail.com> Nobody seen this error and problem? On 01/26/2016 12:24 PM, georgi.int at gmail.com wrote: > Hello, > Can you please tell me how can I fix this error from the varnishlog > and whyt it's caused, because everything I read in the net couldn't > help me. Sometimes on some websites the most pages works fine, but > only certain css files give 503 with this error. > > Thank you in advance. From yamakasi.014 at gmail.com Mon Feb 1 18:51:12 2016 From: yamakasi.014 at gmail.com (Matt .) Date: Mon, 1 Feb 2016 19:51:12 +0100 Subject: List for req.http.host Message-ID: Is there an option to use a list for req.http.host ? now I'm using one line with || but this is getting a little bit long for 50 domains. Other possibilities are welcome too. From Tom.Anheyer at Berlinonline.de Tue Feb 2 08:02:38 2016 From: Tom.Anheyer at Berlinonline.de (Tom Anheyer) Date: Tue, 2 Feb 2016 09:02:38 +0100 Subject: List for req.http.host In-Reply-To: References: Message-ID: <56B0629E.5010806@Berlinonline.de> Hello, a regular expression like req.http.host ~ "^(vhost1|vhost2|vhost3)$" can do that. tom Am 01.02.2016 um 19:51 schrieb Matt .: > Is there an option to use a list for req.http.host ? now I'm using one > line with || but this is getting a little bit long for 50 domains. > > Other possibilities are welcome too. > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4266 bytes Desc: S/MIME Cryptographic Signature URL: From info at massivescale.net Tue Feb 2 14:42:43 2016 From: info at massivescale.net (Andrzej Godziuk) Date: Tue, 2 Feb 2016 15:42:43 +0100 Subject: Graphing number of 503s In-Reply-To: <561F2C67.30702@lelutin.ca> References: <561F2C67.30702@lelutin.ca> Message-ID: <20160202154243.6ea6960b@gdr-desktop.gdr.name> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 15 Oct 2015 00:32:39 -0400 Gabriel Filion wrote: > Hello there, > > I'd like to create a graph of how much 503 pages were served by > varnish. Is there an easy way to count how much such error pages are > sent to clients? > > The only way that I can think right now is to have a permanent > varnishlog that is set to spot the 503s and then use the output from > varnishlog to create the numbers. Graphing MAIN.backend_fail from varnishstat could work too. - -- Andrzej Godziuk https://massivescale.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJWsMAfAAoJEIDBbbxqP12UEq0P/jI2edR1OUsQmylkoiA64rIS xth0paY7G6VO4Z4SBTnxk1VsBcUwRwqqemeJl5gqc/S4QJulwXa0AjEIl9YhQcFz ZjbYovxi2i4t5iGKwAikEEpHRwtR0hFcUFUfz4p+Vxvrp/PQWf3RZMiddwm02Ags qE2C2dF3C6qSCaWFiGnlFYgGOnL9WgOKNymRXnhJ7V0/NE+2iLMWROJX2zJgeVhR Rte3s17fdJhdSa9WR+MXbGa2JEgzM9e7K9c+3EDWLe5So+6gA2XqD0V4CGr6wDhD /m6tysZiZ7j2hjCRz1+lTZVumkSWk68vJxvR9NfrfCCuqCkVTvIQQCljhlZya0Ki OvpJEP4dyRhbK9PXLWMYbGe9d/HEF5/OwwHcoPY2/+UiABnjPde2JDCFp4HxRuMi x+Ls8owxhYN+DmLcCjdUiatxRDpsg2KZo9kHPgVfoLUH9ctOJScK3Mk/zyqwFxMV 3bGUvSAP2KpAFUigo3ki39MppRwZEQDiJygCst8TQHl5qbkZ1tncKaX9WMrh4WzU 7GY/2IpQuFL9N2yIWTfOvGKgrMzXg0r13Dk7ljJI3w7gYyXTXLS8/AAbck121XIO b5CMyolfBYoWwGxrnFN8s0l+Y4PuxgGgTgPUEVRliFr6mPp9iSn+CZLAjdpG9P/b Qufi07v0eJS6UGo0RVuX =sApF -----END PGP SIGNATURE----- From gabster at lelutin.ca Tue Feb 2 18:50:59 2016 From: gabster at lelutin.ca (Gabriel Filion) Date: Tue, 2 Feb 2016 13:50:59 -0500 Subject: Graphing number of 503s In-Reply-To: <20160202154243.6ea6960b@gdr-desktop.gdr.name> References: <561F2C67.30702@lelutin.ca> <20160202154243.6ea6960b@gdr-desktop.gdr.name> Message-ID: <56B0FA93.4090000@lelutin.ca> On 02/02/16 09:42 AM, Andrzej Godziuk wrote: >> I'd like to create a graph of how much 503 pages were served by >> > varnish. Is there an easy way to count how much such error pages are >> > sent to clients? >> > >> > The only way that I can think right now is to have a permanent >> > varnishlog that is set to spot the 503s and then use the output from >> > varnishlog to create the numbers. > Graphing MAIN.backend_fail from varnishstat could work too. this is indeed an interesting value for a global feel of how things are going. however it is my understanding that if grace is enabled, this value might not reflect how much 503s are actually served to end users. still it's a good start -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature URL: From cdgraff at gmail.com Wed Feb 3 02:11:04 2016 From: cdgraff at gmail.com (Alejandro) Date: Tue, 2 Feb 2016 23:11:04 -0300 Subject: Varnish-agent is not available into RPM repo of 4.1 Message-ID: HI Varnish team! some reason to don't build varnish-agent for 4.1 version? I found for 4.0 but not for 4.1... Thanks Alejandro -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume at varnish-software.com Wed Feb 3 08:49:06 2016 From: guillaume at varnish-software.com (Guillaume Quintard) Date: Wed, 3 Feb 2016 09:49:06 +0100 Subject: Difference between n_object, n_objectcore & n_objecthead In-Reply-To: References: Message-ID: >From bin/varnishd/cache/cache_hash.c: * We have two kinds of structures, objecthead and object. An objecthead * corresponds to a given (Host:, URL) tupple, and the objects hung from * the objecthead may represent various variations (ie: Vary: header, * different TTL etc) instances of that web-entity. And from bin/varnishd/cache/cache.h: /* Object core structure --------------------------------------------- * Objects have sideways references in the binary heap and the LRU list * and we want to avoid paging in a lot of objects just to move them up * or down the binheap or to move a unrelated object on the LRU list. * To avoid this we use a proxy object, objcore, to hold the relevant * housekeeping fields parts of an object. */ -- Guillaume Quintard On Fri, Jan 22, 2016 at 8:41 PM, Debraj Manna wrote: > Can someone point me to some doc where these stats are explained? > On Jan 22, 2016 5:37 PM, "Debraj Manna" wrote: > >> Hi, >> >> >> - What is the difference between n_object, n_objectcore & >> n_objecthead? >> - When the objects get expired (or the value of MAIN.n_expired changes) >> will the value of these counters reduce? >> >> >> > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tom.Anheyer at Berlinonline.de Wed Feb 3 12:36:38 2016 From: Tom.Anheyer at Berlinonline.de (Tom Anheyer) Date: Wed, 3 Feb 2016 13:36:38 +0100 Subject: out of workspace (req) Message-ID: <56B1F456.3080200@Berlinonline.de> Hello, I see errors like: - Error out of workspace (req) - Error workspace_client overflow in varnishlog. Tuning the parameter workspace_client to 512k doesn't fix the issue. The application is not ours, so I can't fix the strange cookie spam behaviour. Any Ideas welcome. tom * << Request >> 217165665 - Begin req 217165388 rxreq - Timestamp Start: xxx.xxx.xxx.xxx 0.000000 - Timestamp Req: xxx.xxx.xxx.xxx 0.000000 - ReqStart xxx.xxx.xxx.xxx 48738 - ReqMethod GET - ReqURL /xxx.php?sEcho=1&iColumns=7&sColumns=&iDisplayStart=0&iDisplayLength=50&mDataProp_0=delete&mDataProp_1=edit&mDataProp_2=ID&mDataProp_3=Datei&mDataProp_4=Titel&mDataProp_5=Beschreibung&mDataProp_6=Attribute&sSearch=&bRegex= - ReqProtocol HTTP/1.1 - ReqHeader Host: www.xxxxx.de - ReqHeader User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:41.0) Gecko/20100101 Firefox/41.0 - ReqHeader Accept: application/json, text/javascript, */*; q=0.01 - ReqHeader Accept-Language: de,en-US;q=0.7,en;q=0.3 - ReqHeader Accept-Encoding: gzip, deflate - ReqHeader X-Requested-With: XMLHttpRequest - ReqHeader Referer: https://www.xxxxx.de/vak/dokumente/admin/ - ReqHeader Cookie: POPUPCHECK=1454573487030; _pk_id.1.bc49=a525e09bffd8c13f.xxx.xxx.xxx.xxx.; _pk_ses.1.bc49=*; PHPSESSID=olqokvkkmfqmnlt08394gvc94d5edjo1; [xxx-dokumente][language]=DE; [xxx-dokumente][action]=admin_show; [xxx-dokumente][target]= - ReqHeader Connection: keep-alive - ReqHeader X-Remote-IP: xxx.xxx.xxx.xxx - ReqHeader X-SSL: yes - ReqHeader X-Forwarded-For: xxx.xxx.xxx.xxx - VCL_call RECV - ReqUnset Host: www.xxxxx.de - ReqHeader Host: www.xxxxx.de - ReqHeader X-Portal: www.xxxxx.de - ReqHeader X-Url: /xxx.php?sEcho=1&iColumns=7&sColumns=&iDisplayStart=0&iDisplayLength=50&mDataProp_0=delete&mDataProp_1=edit&mDataProp_2=ID&mDataProp_3=Datei&mDataProp_4=Titel&mDataProp_5=Beschreibung&mDataProp_6=Attribute&sSearch=& - ReqHeader X-Mobile: desk - ReqUnset Cookie: POPUPCHECK=1454573487030; _pk_id.1.bc49=a525e09bffd8c13f.xxx.xxx.xxx.xxx.; _pk_ses.1.bc49=*; PHPSESSID=olqokvkkmfqmnlt08394gvc94d5edjo1; [xxx-dokumente][language]=DE; [xxx-dokumente][action]=admin_show; [xxx-dokumente][target]= - ReqHeader Cookie: ; POPUPCHECK=1454573487030; _pk_id.1.bc49=a525e09bffd8c13f.xxx.xxx.xxx.xxx.; _pk_ses.1.bc49=*; PHPSESSID=olqokvkkmfqmnlt08394gvc94d5edjo1; [xxx-dokumente][language]=DE; [xxx-dokumente][action]=admin_show; [xxx-dokumente][target - ReqUnset Cookie: ; POPUPCHECK=1454573487030; _pk_id.1.bc49=a525e09bffd8c13f.xxx.xxx.xxx.xxx.; _pk_ses.1.bc49=*; PHPSESSID=olqokvkkmfqmnlt08394gvc94d5edjo1; [xxx-dokumente][language]=DE; [xxx-dokumente][action]=admin_show; [xxx-dokumente][target - ReqHeader Cookie: ; PHPSESSID=olqokvkkmfqmnlt08394gvc94d5edjo1; [xxx-dokumente][language]=DE; [xxx-dokumente][action]=admin_show; [xxx-dokumente][target]=document; [xxx-dokumente][directory]=rechtsgrundlagen; [xxx-dokumente][sEcho]=1; [xxx-dokumente][iColumns]=6; - ReqUnset Cookie: ; PHPSESSID=olqokvkkmfqmnlt08394gvc94d5edjo1; [xxx-dokumente][language]=DE; [xxx-dokumente][action]=admin_show; [xxx-dokumente][target]=document; [xxx-dokumente][directory]=rechtsgrundlagen; [xxx-dokumente][sEcho]=1; [xxx-dokumente][iColumns]=6; - ReqHeader Cookie: PHPSESSID=olqokvkkmfqmnlt08394gvc94d5edjo1; [xxx-dokumente][language]=DE; [xxx-dokumente][action]=admin_show; [xxx-dokumente][target]=document; [xxx-dokumente][directory]=rechtsgrundlagen; [xxx-dokumente][sEcho]=1; [xxx-dokumente][iColumns]=6; [v - VCL_return pass - VCL_call HASH - VCL_return lookup - VCL_call PASS - VCL_return fetch - Link bereq 217165666 pass - Timestamp Fetch: xxx.xxx.xxx.xxx 0.113683 - RespProtocol HTTP/1.1 - RespStatus 200 - RespReason OK - RespHeader Date: Wed, 03 Feb 2016 08:49:00 GMT - RespHeader Expires: Thu, 19 Nov 1981 08:52:00 GMT - RespHeader Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, proxy-revalidate - RespHeader Pragma: no-cache - RespHeader Content-Type: text/html; charset=utf-8 - RespHeader Set-Cookie: [xxx-dokumente][sEcho]=1; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][iColumns]=7; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sColumns]=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][iDisplayStart]=0; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][iDisplayLength]=50; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][mDataProp_0]=delete; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][mDataProp_1]=edit; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][mDataProp_2]=ID; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][mDataProp_3]=Datei; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][mDataProp_4]=Titel; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][mDataProp_5]=Beschreibung; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][mDataProp_6]=Attribute; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sSearch]=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bRegex]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sSearch_0]=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bRegex_0]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSearchable_0]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sSearch_1]=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bRegex_1]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSearchable_1]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sSearch_2]=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bRegex_2]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSearchable_2]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sSearch_3]=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bRegex_3]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSearchable_3]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sSearch_4]=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bRegex_4]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSearchable_4]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sSearch_5]=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bRegex_5]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSearchable_5]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sSearch_6]=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bRegex_6]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSearchable_6]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][iSortCol_0]=0; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][sSortDir_0]=asc; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][iSortingCols]=1; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSortable_0]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSortable_1]=false; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSortable_2]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSortable_3]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSortable_4]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSortable_5]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][bSortable_6]=true; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader Set-Cookie: [xxx-dokumente][language]=DE; expires=Fri, 04-Mar-2016 08:49:00 GMT; path=/ - RespHeader X-Intranet: 1 - RespHeader Vary: Accept-Encoding, X-Mobile - RespHeader Content-Encoding: gzip - RespHeader X-Varnish: 217165665 - RespHeader Age: 0 - RespHeader Via: 1.1 varnish-v4 - VCL_call DELIVER - RespUnset Vary: Accept-Encoding, X-Mobile - RespHeader Vary: Accept-Encoding, User-Agent - VCL_return deliver - Timestamp Process: xxx.xxx.xxx.xxx 0.000135 - RespHeader Accept-Ranges: bytes - RespHeader Content-Length: 1800 - Debug "RES_MODE 2" - LostHeader Connection: keep-alive - Error out of workspace (req) - Error workspace_client overflow - RespProtocol HTTP/1.1 - RespStatus 500 - RespReason Internal Server Error - Timestamp Resp: xxx.xxx.xxx.xxx 0.000054 - ReqAcct 2615 0 2615 0 0 0 - End -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4266 bytes Desc: S/MIME Cryptographic Signature URL: From tim.little at adestra.com Fri Feb 5 13:56:43 2016 From: tim.little at adestra.com (Tim Little) Date: Fri, 5 Feb 2016 13:56:43 +0000 Subject: varnishadm backend.list missing IPs Message-ID: <56B4AA1B.1070902@adestra.com> Hi guys, I have just upgraded to Varnish-4.1.1 from Varnish-4.0 and I have noticed that `varnishadm backend.list` no longer displays the IP address of the backend. We were using this to monitor the backends health in Nagios NRPE check but this no longer works. Is there a way of making backend.list display the IP addresses again? Or is there a better way to monitor the backends in nagios? Regards Tim ** -------------- next part -------------- An HTML attachment was scrubbed... URL: From georgi.int at gmail.com Fri Feb 5 14:28:47 2016 From: georgi.int at gmail.com (georgi.int at gmail.com) Date: Fri, 5 Feb 2016 16:28:47 +0200 Subject: junk after gzip encoding In-Reply-To: <56A74950.3030700@gmail.com> References: <56A74950.3030700@gmail.com> Message-ID: <56B4B19F.5010402@gmail.com> If I put in .htaccess of the site the following line unsetting the encoding everything is ok, but why this happens as in default.vcl the encodings are set correctly: #this in htaccess solve the problem RequestHeader unset Accept-Encoding #This is my default.vcl configuration if (req.http.Accept-Encoding) { if (req.http.Accept-Encoding ~ "gzip") { set req.http.Accept-Encoding = "gzip"; } else if (req.http.Accept-Encoding ~ "deflate") { set req.http.Accept-Encoding = "deflate"; } else { unset req.http.Accept-Encoding; } } This happens installing wordpress plugins and themes. On 01/26/2016 12:24 PM, georgi.int at gmail.com wrote: > Hello, > Can you please tell me how can I fix this error from the varnishlog > and whyt it's caused, because everything I read in the net couldn't > help me. Sometimes on some websites the most pages works fine, but > only certain css files give 503 with this error. > > Thank you in advance. From dridi at varni.sh Mon Feb 8 09:14:38 2016 From: dridi at varni.sh (Dridi Boukelmoune) Date: Mon, 8 Feb 2016 10:14:38 +0100 Subject: varnishadm backend.list missing IPs In-Reply-To: <56B4AA1B.1070902@adestra.com> References: <56B4AA1B.1070902@adestra.com> Message-ID: Hi Tim, > I have just upgraded to Varnish-4.1.1 from Varnish-4.0 and I have noticed > that `varnishadm backend.list` no longer displays the > IP address of the backend. That's because backends are no longer shared but owned by VCLs, so instead of being named like 4.0's $BACKEND($IPv4,$IPv6,$PORT) they are now named $VCL.$BACKEND. > We were using this to monitor the backends health in Nagios NRPE check but > this no longer works. Yes, 4.1 is a major release and breaks compatibility in some places. > Is there a way of making backend.list display the IP addresses again? I think not. > Or is there a better way to monitor the backends in nagios? I don't know, you can know the state of your backends as seen by Varnish but you should probably also monitor your backends directly with nagios. Dridi From A.Hongens at netmatch.nl Tue Feb 9 15:55:10 2016 From: A.Hongens at netmatch.nl (=?iso-8859-1?Q?Angelo_H=F6ngens?=) Date: Tue, 9 Feb 2016 15:55:10 +0000 Subject: talking proxy to backends Message-ID: <6A7ABA19243F1E4EADD8BB1563CDDCCB8A7581B3@TIL-EXCH-05.netmatch.local> Hey, I'm testing a new setup with varnish 4.1 and the proxy protocol. Talking proxy works fine on the front-end, hitch talking to varnish for ssl offloading. But can I also configure varnish to talk proxy to the backends? (I want varnish to talk proxy to haproxy that's behind my varnishes). I cannot seem to find any documentation or examples. Angelo. From subharaj.manna at gmail.com Tue Feb 9 15:58:42 2016 From: subharaj.manna at gmail.com (Debraj Manna) Date: Tue, 9 Feb 2016 21:28:42 +0530 Subject: Piped request and varnish cache miss counters Message-ID: Hi, Are piped requests considered as cache miss in varnish stats miss counter? Thanks, Debraj -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Tue Feb 9 16:30:44 2016 From: perbu at varnish-software.com (Per Buer) Date: Tue, 9 Feb 2016 17:30:44 +0100 Subject: Piped request and varnish cache miss counters In-Reply-To: References: Message-ID: Hi Debraj, No. When you pipe a request you are essentially creating a TCP connection between the client and the backend. Varnish has no idea what is going on on that connection. You might run SSH on top of that connection without Varnish being bothered by it. Per. On Tue, Feb 9, 2016 at 4:58 PM, Debraj Manna wrote: > Hi, > > Are piped requests considered as cache miss in varnish stats miss counter? > > Thanks, > Debraj > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -- *Per Buer* CTO | Varnish Software AS Cell: +47 95839117 We Make Websites Fly! www.varnish-software.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Tue Feb 9 16:32:47 2016 From: perbu at varnish-software.com (Per Buer) Date: Tue, 9 Feb 2016 17:32:47 +0100 Subject: talking proxy to backends In-Reply-To: <6A7ABA19243F1E4EADD8BB1563CDDCCB8A7581B3@TIL-EXCH-05.netmatch.local> References: <6A7ABA19243F1E4EADD8BB1563CDDCCB8A7581B3@TIL-EXCH-05.netmatch.local> Message-ID: Hi Angelo, On Tue, Feb 9, 2016 at 4:55 PM, Angelo H?ngens wrote: I'm testing a new setup with varnish 4.1 and the proxy protocol. Talking > proxy works fine on the front-end, hitch talking to varnish for ssl > offloading. > > But can I also configure varnish to talk proxy to the backends? (I want > varnish to talk proxy to haproxy that's behind my varnishes). I cannot seem > to find any documentation or examples. > I've never heard of any reasons to do so. Varnish doesn't know how to talk proxy to it's backend. Out of curiosity, why don't you want to speak HTTP to the backends? The HTTP request that hits the backend should already have the information carried in X-Forwarded-For. Per. -- *Per Buer* CTO | Varnish Software AS Cell: +47 95839117 We Make Websites Fly! www.varnish-software.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From subharaj.manna at gmail.com Tue Feb 9 16:36:17 2016 From: subharaj.manna at gmail.com (Debraj Manna) Date: Tue, 9 Feb 2016 22:06:17 +0530 Subject: Piped request and varnish cache miss counters In-Reply-To: References: Message-ID: Thanks Per. On Feb 9, 2016 10:01 PM, "Per Buer" wrote: > Hi Debraj, > > No. When you pipe a request you are essentially creating a TCP connection > between the client and the backend. Varnish has no idea what is going on on > that connection. You might run SSH on top of that connection without > Varnish being bothered by it. > > > Per. > > On Tue, Feb 9, 2016 at 4:58 PM, Debraj Manna > wrote: > >> Hi, >> >> Are piped requests considered as cache miss in varnish stats miss counter? >> >> Thanks, >> Debraj >> >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at varnish-cache.org >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> > > > > -- > *Per Buer* > CTO | Varnish Software AS > Cell: +47 95839117 > We Make Websites Fly! > www.varnish-software.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From audun at ytterdal.net Tue Feb 9 20:38:52 2016 From: audun at ytterdal.net (Audun Ytterdal) Date: Tue, 9 Feb 2016 21:38:52 +0100 Subject: talking proxy to backends In-Reply-To: References: <6A7ABA19243F1E4EADD8BB1563CDDCCB8A7581B3@TIL-EXCH-05.netmatch.local> Message-ID: We have sent in a support request to varnish for the same thing a while back. Usually varnish is in some sort of sandwitch. It could be haproxy -> Varnish -> haproxy, or h2o ->Varnish->nginx or nginx->Varnish->haproxy or stud->varnish Where people want to do their logic is up to them. It can always be solved with http-headers x-forwarded-for and/or x-client-ip, as it has earlier. But there is a reason why haproxy among others have aded this functionality. Then suddenly you don't need extra modules like mod_remote_ip for apache or massage http-headers into ips. client.ip, accesslogs, varnishlog has a more relevant ip without hacks * haproxy supports it both as a client and towards backends * nginx support it as a client. Patchsets for backends exists ( https://github.com/yaoweibin/nginx_tcp_proxy_module/pull/110) * h2o supprots is a client and I have a issue for it on github ( https://github.com/h2o/h2o/issues/602) It's not a very important thing, can be solved by other means. But it would be nice. -- Audun -------------- next part -------------- An HTML attachment was scrubbed... URL: From phk at phk.freebsd.dk Tue Feb 9 20:49:37 2016 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 09 Feb 2016 20:49:37 +0000 Subject: talking proxy to backends In-Reply-To: References: <6A7ABA19243F1E4EADD8BB1563CDDCCB8A7581B3@TIL-EXCH-05.netmatch.local> Message-ID: <2540.1455050977@critter.freebsd.dk> -------- In message , Audun Ytterdal writes: The reason PROXY makes sense for HAproxy and similar "plumbing" proxies, is that they do no session-multiplexing to begin with, so PROXY only has upsides for them: Send a prefix, then just move bytes. For Varnish much richer feature set, PROXY between Varnish and the backend has significant downsides. The biggest downside is that that any V->BE connection can only ever be used for requests coming from one single C->V connection. (X-)Forwarded-For doesn't have that problem. That said, it wouldn't be too hard to make it possible to send PROXY to the backend. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From dridi at varni.sh Tue Feb 9 22:09:32 2016 From: dridi at varni.sh (Dridi Boukelmoune) Date: Tue, 9 Feb 2016 23:09:32 +0100 Subject: varnishadm backend.list missing IPs In-Reply-To: References: <56B4AA1B.1070902@adestra.com> Message-ID: On Tue, Feb 9, 2016 at 10:10 PM, Jason Price wrote: >> > Or is there a better way to monitor the backends in nagios? > >> I don't know, you can know the state of your backends as seen by >> Varnish but you should probably also monitor your backends directly >> with nagios. > > This answer is not really a good one. I've watched varnish stop being able Sorry, I will try to write a better one and CC the -misc list back. > to talk to single backends on rare occasion. The backends were fine. (this > was in varnish-3 to be fair, but still). Agreed, it doesn't hurt to monitor both. Please note that you don't actually need probes to decided whether a backend is healthy or sick. You can do it with the varnish-cli(7) using `backend.set_health`. You could monitor backends with nagios and update their health with varnishadm for instance. Only a probe will give you the health from varnish's PoV but otherwise they are rather limited IMHO. > Ultimately, being able to monitor the health of each backend and varnish's > understanding of each backend is hugely valuable from a triage perspective. Again, agreed. One should monitor whatever is valuable to get a better diagnostic. However with Varnish 4.1 the rules changed wrt to how backends are perceived. Unfortunately in this case we win some and we lose some. > (does "varnishadm debug.health" still work? Nagios could theoretically > parse that, though it'd be harder) I'm afraid it wouldn't help, but it's no longer there. It's in backend.list now. Below is an example of a varnishd instance running in debug mode on my machine: === $ varnishd -n $(mktemp -d) -a :0 -d Debug: Platform: Linux,4.2.6-201.fc22.x86_64,x86_64,-jnone,-smalloc,-smalloc,-hcritbit 200 293 ----------------------------- Varnish Cache CLI 1.0 ----------------------------- Linux,4.2.6-201.fc22.x86_64,x86_64,-jnone,-smalloc,-smalloc,-hcritbit varnish-4.1.1-beta2 revision 66bb824 Type 'help' for command list. Type 'quit' to close CLI session. Type 'start' to launch worker process. vcl.inline boot "vcl 4.0; backend be { .host = \"0\"; .probe = {} }" 200 14 VCL compiled. start Debug: Child (24874) Started 200 0 Info: Child (24874) said Child starts backend.list 200 98 Backend name Admin Probe boot.be probe Sick 2/8 backend.list -p 200 340 Backend name Admin Probe boot.be probe Sick 2/8 Current states good: 2 threshold: 3 window: 8 Average response time of good probes: 0.000000 Oldest ================================================== Newest ----------------------------------------------------------HH---- Happy === Currently you can only find this information in the VCL AFAICT, and I don't think it'd be a good idea to parse vcl.show :) It might be interesting to print the endpoint in backend.list, possible with another flag. From geoff at uplex.de Wed Feb 10 09:13:26 2016 From: geoff at uplex.de (Geoff Simmons) Date: Wed, 10 Feb 2016 10:13:26 +0100 Subject: varnishadm backend.list missing IPs In-Reply-To: <56B4AA1B.1070902@adestra.com> References: <56B4AA1B.1070902@adestra.com> Message-ID: <56BAFF36.6090801@uplex.de> On 02/05/2016 02:56 PM, Tim Little wrote: > > I have just upgraded to Varnish-4.1.1 from Varnish-4.0 and I have > noticed that `varnishadm backend.list` no longer displays the IP > address of the backend. > > We were using this to monitor the backends health in Nagios NRPE > check but this no longer works. What we do is name the backends in VCL so that the application and hostname is human-readable and parseable -- for application "foobar" running on host bar-baz-quux, the VCL backend name is FOOBAR_bar_baz_quux. Your nagios check can then parse it from the output of backend.list, and you're good. HTH, Geoff -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg Tel +49 40 2880 5731 Mob +49 176 636 90917 Fax +49 40 42949753 http://uplex.de -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From michaeljones401 at gmail.com Sat Feb 13 13:25:41 2016 From: michaeljones401 at gmail.com (Mike Jones) Date: Sat, 13 Feb 2016 13:25:41 +0000 Subject: Varnish install on aws Message-ID: Hi, I have a single ec2 instance running and would like to install and configure Varnish for that aws instance I've changed the default settings for varnish - /etc/sysconfig/varnish DAEMON_OPTS="-a :80 \ -T localhost:6082 \ -b localhost:8080 \ -u varnish -g varnish \ -s file,/var/lib/varnish/varnish_storage.bin,1G" and configured httpd - /etc/httpd/conf/httpd.conf to listen on port 8080 But when I restart both services, the webpage fails to load. There's nothing in the error_log and when I tail -f the access_log nothing is logged when I refresh the page. Do I need to open port 8080 too? Are there any guides on how to configure Varnish for an aws instance? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From lee at leetrout.com Sat Feb 13 13:41:20 2016 From: lee at leetrout.com (Lee Trout) Date: Sat, 13 Feb 2016 08:41:20 -0500 Subject: Varnish install on aws In-Reply-To: References: Message-ID: > Do I need to open port 8080 too? Open it where? In a security group? You should make sure you have port 80 open in your security group but that won't affect local host. You should try curling against the interfaces on the box from the box itself and make sure it's actually sending info back locally. With your config I believe you should be able to curl local host on port 80 as well since you only specified a listening port. On Saturday, February 13, 2016, Mike Jones wrote: > Hi, > > I have a single ec2 instance running and would like to install and > configure Varnish for that aws instance > > I've changed the default settings for varnish - /etc/sysconfig/varnish > > DAEMON_OPTS="-a :80 \ > -T localhost:6082 \ > -b localhost:8080 \ > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,1G" > > and configured httpd - /etc/httpd/conf/httpd.conf to listen on port 8080 > > But when I restart both services, the webpage fails to load. > > There's nothing in the error_log and when I tail -f the access_log nothing > is logged when I refresh the page. > Do I need to open port 8080 too? > > Are there any guides on how to configure Varnish for an aws instance? > > Thanks > -- Sorry I fat thumbed this on an iPhone -------------- next part -------------- An HTML attachment was scrubbed... URL: From michaeljones401 at gmail.com Sat Feb 13 14:04:48 2016 From: michaeljones401 at gmail.com (Mike Jones) Date: Sat, 13 Feb 2016 14:04:48 +0000 Subject: Varnish install on aws In-Reply-To: References: Message-ID: Yes, I was talking about the security group, I did open that but it didn't make any difference. With the settings previously mentioned I tried running curl on port 80 on I get curl: (7) Failed to connect to localhost port 80: Connection refused. On port 8080 I get the default apache page, but adding a directory after the port 'curl 127.0.0.1:8080/wordpress' I get an error saying the page has moved. On port 6082 I get 'Authentication required' On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout wrote: > > Do I need to open port 8080 too? > > Open it where? In a security group? You should make sure you have port 80 > open in your security group but that won't affect local host. > > You should try curling against the interfaces on the box from the box > itself and make sure it's actually sending info back locally. With your > config I believe you should be able to curl local host on port 80 as well > since you only specified a listening port. > > On Saturday, February 13, 2016, Mike Jones > wrote: > >> Hi, >> >> I have a single ec2 instance running and would like to install and >> configure Varnish for that aws instance >> >> I've changed the default settings for varnish - /etc/sysconfig/varnish >> >> DAEMON_OPTS="-a :80 \ >> -T localhost:6082 \ >> -b localhost:8080 \ >> -u varnish -g varnish \ >> -s file,/var/lib/varnish/varnish_storage.bin,1G" >> >> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port 8080 >> >> But when I restart both services, the webpage fails to load. >> >> There's nothing in the error_log and when I tail -f the access_log >> nothing is logged when I refresh the page. >> Do I need to open port 8080 too? >> >> Are there any guides on how to configure Varnish for an aws instance? >> >> Thanks >> > > > -- > Sorry I fat thumbed this on an iPhone > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lee at leetrout.com Sat Feb 13 15:53:59 2016 From: lee at leetrout.com (Lee Trout) Date: Sat, 13 Feb 2016 07:53:59 -0800 Subject: Varnish install on aws In-Reply-To: References: Message-ID: I double checked my configuration for AWS. I'm running a CentOS 7 AMI. I installed https://repo.varnish-cache.org/redhat/varnish-4.1.el7.rpm and I'm using http://pastebin.com/K8CfxdqL in /etc/varnish/varnish.params And i'm using the startup script it ships with for systemd `systemctl restart varnish` On Sat, Feb 13, 2016 at 6:04 AM, Mike Jones wrote: > Yes, I was talking about the security group, I did open that but it didn't > make any difference. > > With the settings previously mentioned I tried running curl on port 80 on > I get > > curl: (7) Failed to connect to localhost port 80: Connection refused. > > On port 8080 I get the default apache page, but adding a directory after > the port 'curl 127.0.0.1:8080/wordpress' I get an error saying the page > has moved. > > On port 6082 I get 'Authentication required' > > > On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout wrote: > >> > Do I need to open port 8080 too? >> >> Open it where? In a security group? You should make sure you have port 80 >> open in your security group but that won't affect local host. >> >> You should try curling against the interfaces on the box from the box >> itself and make sure it's actually sending info back locally. With your >> config I believe you should be able to curl local host on port 80 as well >> since you only specified a listening port. >> >> On Saturday, February 13, 2016, Mike Jones >> wrote: >> >>> Hi, >>> >>> I have a single ec2 instance running and would like to install and >>> configure Varnish for that aws instance >>> >>> I've changed the default settings for varnish - /etc/sysconfig/varnish >>> >>> DAEMON_OPTS="-a :80 \ >>> -T localhost:6082 \ >>> -b localhost:8080 \ >>> -u varnish -g varnish \ >>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>> >>> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port 8080 >>> >>> But when I restart both services, the webpage fails to load. >>> >>> There's nothing in the error_log and when I tail -f the access_log >>> nothing is logged when I refresh the page. >>> Do I need to open port 8080 too? >>> >>> Are there any guides on how to configure Varnish for an aws instance? >>> >>> Thanks >>> >> >> >> -- >> Sorry I fat thumbed this on an iPhone >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From idle at pobox.com Sat Feb 13 16:15:49 2016 From: idle at pobox.com (Brad Tarver) Date: Sat, 13 Feb 2016 10:15:49 -0600 Subject: Varnish install on aws In-Reply-To: References: Message-ID: <56BF56B5.7050608@pobox.com> 6082 is the admin port This is my config on ubuntu: http://pastebin.com/E3tQ1eC1 -- Brad Tarver Mike Jones wrote: > Yes, I was talking about the security group, I did open that but it > didn't make any difference. > > With the settings previously mentioned I tried running curl on port 80 > on I get > > curl: (7) Failed to connect to localhost port 80: Connection refused. > > On port 8080 I get the default apache page, but adding a directory > after the port 'curl 127.0.0.1:8080/wordpress > ' I get an error saying the page has > moved. > > On port 6082 I get 'Authentication required' > > > On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout > wrote: > > > Do I need to open port 8080 too? > > Open it where? In a security group? You should make sure you have > port 80 open in your security group but that won't affect local host. > > You should try curling against the interfaces on the box from the > box itself and make sure it's actually sending info back locally. > With your config I believe you should be able to curl local host > on port 80 as well since you only specified a listening port. > > On Saturday, February 13, 2016, Mike Jones > > wrote: > > Hi, > > I have a single ec2 instance running and would like to install > and configure Varnish for that aws instance > > I've changed the default settings for varnish - > /etc/sysconfig/varnish > > DAEMON_OPTS="-a :80 \ > -T localhost:6082 \ > -b localhost:8080 \ > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,1G" > > and configured httpd - /etc/httpd/conf/httpd.conf to listen on > port 8080 > > But when I restart both services, the webpage fails to load. > > There's nothing in the error_log and when I tail -f the > access_log nothing is logged when I refresh the page. > Do I need to open port 8080 too? > > Are there any guides on how to configure Varnish for an aws > instance? > > Thanks > > > > -- > Sorry I fat thumbed this on an iPhone > > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc -------------- next part -------------- An HTML attachment was scrubbed... URL: From michaeljones401 at gmail.com Sat Feb 13 16:56:29 2016 From: michaeljones401 at gmail.com (Mike Jones) Date: Sat, 13 Feb 2016 16:56:29 +0000 Subject: Varnish install on aws In-Reply-To: <56BF56B5.7050608@pobox.com> References: <56BF56B5.7050608@pobox.com> Message-ID: I have a 'WordPress basic single instance' from http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html and my varnish file, located in /etc/sysconfig/varnish, looks like http://pastebin.com/hZNr6Apc While my httpd conf file, /etc/httpd/conf/httpd.conf, looks like http://pastebin.com/xeZs8KQq Running varnishstat looks like it's running but when visiting the webserver through the browser the page fails to load. On Sat, Feb 13, 2016 at 4:15 PM, Brad Tarver wrote: > 6082 is the admin port > > This is my config on ubuntu: http://pastebin.com/E3tQ1eC1 > > > > > > > -- > Brad Tarver > > > Mike Jones wrote: > > Yes, I was talking about the security group, I did open that but it didn't > make any difference. > > With the settings previously mentioned I tried running curl on port 80 on > I get > > curl: (7) Failed to connect to localhost port 80: Connection refused. > > On port 8080 I get the default apache page, but adding a directory after > the port 'curl 127.0.0.1:8080/wordpress' I get an error saying the page > has moved. > > On port 6082 I get 'Authentication required' > > > On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout wrote: > >> > Do I need to open port 8080 too? >> >> Open it where? In a security group? You should make sure you have port 80 >> open in your security group but that won't affect local host. >> >> You should try curling against the interfaces on the box from the box >> itself and make sure it's actually sending info back locally. With your >> config I believe you should be able to curl local host on port 80 as well >> since you only specified a listening port. >> >> On Saturday, February 13, 2016, Mike Jones >> wrote: >> >>> Hi, >>> >>> I have a single ec2 instance running and would like to install and >>> configure Varnish for that aws instance >>> >>> I've changed the default settings for varnish - /etc/sysconfig/varnish >>> >>> DAEMON_OPTS="-a :80 \ >>> -T localhost:6082 \ >>> -b localhost:8080 \ >>> -u varnish -g varnish \ >>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>> >>> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port 8080 >>> >>> But when I restart both services, the webpage fails to load. >>> >>> There's nothing in the error_log and when I tail -f the access_log >>> nothing is logged when I refresh the page. >>> Do I need to open port 8080 too? >>> >>> Are there any guides on how to configure Varnish for an aws instance? >>> >>> Thanks >>> >> >> >> -- >> Sorry I fat thumbed this on an iPhone >> > > _______________________________________________ > varnish-misc mailing listvarnish-misc at varnish-cache.orghttps://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lee at leetrout.com Sat Feb 13 17:36:04 2016 From: lee at leetrout.com (Lee Trout) Date: Sat, 13 Feb 2016 12:36:04 -0500 Subject: Varnish install on aws In-Reply-To: References: <56BF56B5.7050608@pobox.com> Message-ID: Can you paste the output of varnishlog? And can you double check before and after stopping / restating that there is nothing on port 80 before starting varnish and then confirm varnish is listening on port 80 after you start it? You can go this with `lsof -i :80 -sTCP:LISTEN` On Sat, Feb 13, 2016 at 11:56 AM, Mike Jones wrote: > I have a 'WordPress basic single instance' from > http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html > > and my varnish file, located in /etc/sysconfig/varnish, looks like > > http://pastebin.com/hZNr6Apc > > While my httpd conf file, /etc/httpd/conf/httpd.conf, looks like > > http://pastebin.com/xeZs8KQq > > Running varnishstat looks like it's running but when visiting the > webserver through the browser the page fails to load. > > On Sat, Feb 13, 2016 at 4:15 PM, Brad Tarver wrote: > >> 6082 is the admin port >> >> This is my config on ubuntu: http://pastebin.com/E3tQ1eC1 >> >> >> >> >> >> >> -- >> Brad Tarver >> >> >> Mike Jones wrote: >> >> Yes, I was talking about the security group, I did open that but it >> didn't make any difference. >> >> With the settings previously mentioned I tried running curl on port 80 on >> I get >> >> curl: (7) Failed to connect to localhost port 80: Connection refused. >> >> On port 8080 I get the default apache page, but adding a directory after >> the port 'curl 127.0.0.1:8080/wordpress' I get an error saying the page >> has moved. >> >> On port 6082 I get 'Authentication required' >> >> >> On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout wrote: >> >>> > Do I need to open port 8080 too? >>> >>> Open it where? In a security group? You should make sure you have port >>> 80 open in your security group but that won't affect local host. >>> >>> You should try curling against the interfaces on the box from the box >>> itself and make sure it's actually sending info back locally. With your >>> config I believe you should be able to curl local host on port 80 as well >>> since you only specified a listening port. >>> >>> On Saturday, February 13, 2016, Mike Jones >>> wrote: >>> >>>> Hi, >>>> >>>> I have a single ec2 instance running and would like to install and >>>> configure Varnish for that aws instance >>>> >>>> I've changed the default settings for varnish - /etc/sysconfig/varnish >>>> >>>> DAEMON_OPTS="-a :80 \ >>>> -T localhost:6082 \ >>>> -b localhost:8080 \ >>>> -u varnish -g varnish \ >>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>> >>>> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port 8080 >>>> >>>> But when I restart both services, the webpage fails to load. >>>> >>>> There's nothing in the error_log and when I tail -f the access_log >>>> nothing is logged when I refresh the page. >>>> Do I need to open port 8080 too? >>>> >>>> Are there any guides on how to configure Varnish for an aws instance? >>>> >>>> Thanks >>>> >>> >>> >>> -- >>> Sorry I fat thumbed this on an iPhone >>> >> >> _______________________________________________ >> varnish-misc mailing listvarnish-misc at varnish-cache.orghttps://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michaeljones401 at gmail.com Sat Feb 13 17:56:42 2016 From: michaeljones401 at gmail.com (Mike Jones) Date: Sat, 13 Feb 2016 17:56:42 +0000 Subject: Varnish install on aws In-Reply-To: References: <56BF56B5.7050608@pobox.com> Message-ID: Restarting varnish, sudo service varnish restart, doesn't show any errors that another service is using the same port. Running lsof -i :80 -sTCP:LISTEN, produces [ec2-user at ip-xxx-xx-xx-xx html]$ sudo sudo lsof -i :80 -sTCP:LISTEN COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME varnishd 9617 varnish 8u IPv4 320854 0t0 TCP *:http (LISTEN) varnishd 9617 varnish 9u IPv6 320855 0t0 TCP *:http (LISTEN) [ec2-user at ip-xxx-xx-xx-xx html]$ sudo sudo lsof -i :8080 -sTCP:LISTEN COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME httpd 9585 root 4u IPv6 320769 0t0 TCP *:webcache (LISTEN) httpd 9587 apache 4u IPv6 320769 0t0 TCP *:webcache (LISTEN) httpd 9588 apache 4u IPv6 320769 0t0 TCP *:webcache (LISTEN) httpd 9589 apache 4u IPv6 320769 0t0 TCP *:webcache (LISTEN) httpd 9590 apache 4u IPv6 320769 0t0 TCP *:webcache (LISTEN) httpd 9591 apache 4u IPv6 320769 0t0 TCP *:webcache (LISTEN) On Sat, Feb 13, 2016 at 5:36 PM, Lee Trout wrote: > Can you paste the output of varnishlog? > > And can you double check before and after stopping / restating that there > is nothing on port 80 before starting varnish and then confirm varnish is > listening on port 80 after you start it? You can go this with `lsof -i :80 > -sTCP:LISTEN` > > On Sat, Feb 13, 2016 at 11:56 AM, Mike Jones > wrote: > >> I have a 'WordPress basic single instance' from >> http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html >> >> and my varnish file, located in /etc/sysconfig/varnish, looks like >> >> http://pastebin.com/hZNr6Apc >> >> While my httpd conf file, /etc/httpd/conf/httpd.conf, looks like >> >> http://pastebin.com/xeZs8KQq >> >> Running varnishstat looks like it's running but when visiting the >> webserver through the browser the page fails to load. >> >> On Sat, Feb 13, 2016 at 4:15 PM, Brad Tarver wrote: >> >>> 6082 is the admin port >>> >>> This is my config on ubuntu: http://pastebin.com/E3tQ1eC1 >>> >>> >>> >>> >>> >>> >>> -- >>> Brad Tarver >>> >>> >>> Mike Jones wrote: >>> >>> Yes, I was talking about the security group, I did open that but it >>> didn't make any difference. >>> >>> With the settings previously mentioned I tried running curl on port 80 >>> on I get >>> >>> curl: (7) Failed to connect to localhost port 80: Connection refused. >>> >>> On port 8080 I get the default apache page, but adding a directory after >>> the port 'curl 127.0.0.1:8080/wordpress' I get an error saying the page >>> has moved. >>> >>> On port 6082 I get 'Authentication required' >>> >>> >>> On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout wrote: >>> >>>> > Do I need to open port 8080 too? >>>> >>>> Open it where? In a security group? You should make sure you have port >>>> 80 open in your security group but that won't affect local host. >>>> >>>> You should try curling against the interfaces on the box from the box >>>> itself and make sure it's actually sending info back locally. With your >>>> config I believe you should be able to curl local host on port 80 as well >>>> since you only specified a listening port. >>>> >>>> On Saturday, February 13, 2016, Mike Jones >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> I have a single ec2 instance running and would like to install and >>>>> configure Varnish for that aws instance >>>>> >>>>> I've changed the default settings for varnish - /etc/sysconfig/varnish >>>>> >>>>> DAEMON_OPTS="-a :80 \ >>>>> -T localhost:6082 \ >>>>> -b localhost:8080 \ >>>>> -u varnish -g varnish \ >>>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>>> >>>>> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port >>>>> 8080 >>>>> >>>>> But when I restart both services, the webpage fails to load. >>>>> >>>>> There's nothing in the error_log and when I tail -f the access_log >>>>> nothing is logged when I refresh the page. >>>>> Do I need to open port 8080 too? >>>>> >>>>> Are there any guides on how to configure Varnish for an aws instance? >>>>> >>>>> Thanks >>>>> >>>> >>>> >>>> -- >>>> Sorry I fat thumbed this on an iPhone >>>> >>> >>> _______________________________________________ >>> varnish-misc mailing listvarnish-misc at varnish-cache.orghttps://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michaeljones401 at gmail.com Sat Feb 13 18:43:07 2016 From: michaeljones401 at gmail.com (Mike Jones) Date: Sat, 13 Feb 2016 18:43:07 +0000 Subject: Varnish install on aws In-Reply-To: <62828667-9CCF-4947-BBDF-6F321B720312@otoh.org> References: <62828667-9CCF-4947-BBDF-6F321B720312@otoh.org> Message-ID: Thank you, running ?varnishd -d -a :80 -T localhost:6082 -b localhost:8080 -u varnish -g varnish -s file,/var/lib/varnish/varnish_storage.bin,1G? works When trying to run your original example it complained 'Only one of -b or -f can be specified'. So I removed the the 'f'. Changing it to ?varnishd -a :80 -T localhost:6082 -b localhost:8080 -u varnish -g varnish -s file,/var/lib/varnish/varnish_storage.bin,1G? Starts Varnish and the web page now loads, thank you. Out of interest, restarting the service fails on stopping the cache [ec2-user at ip-xxx-xx-xx-xx varnish]$ sudo service varnish restart Stopping Varnish Cache: [FAILED] Starting Varnish Cache: [ OK ] This isn't a huge issue, but any reason why the cache is failing? Thanks again :) On Sat, Feb 13, 2016 at 6:23 PM, Paul Armstrong wrote: > > > On 2016-02-13, at 05:25:41, Mike Jones > wrote: > > > > DAEMON_OPTS="-a :80 \ > > -T localhost:6082\ > > -b localhost:8080 \ > > -u varnish -g varnish \ > > -s file,/var/lib/varnish/varnish_storage.bin,1G" > > > > But when I restart both services, the webpage fails to load. > > Start varnish by hand: ?varnishd -fd -a :80 -T localhost:6082 -b > localhost:8080 -u varnish -g varnish -s > file,/var/lib/varnish/varnish_storage.bin,1G? > This turns on foreground and debugging, which should help locate the issue. > > You can also use ?varnishlog' to show what?s going on traffic wise after > you?ve worked out why it?s giving you a connection refused on the front end. > > If performance is your game, ?-s malloc' is more likely to serve you > better than ?-s file?, unless you?re on a t2.tiny. > > > Do I need to open port 8080 too? > > As pointed out by others, do not open port 8080 to the world. > > Paul > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.hongens at netmatch.nl Sun Feb 14 12:17:33 2016 From: a.hongens at netmatch.nl (=?UTF-8?Q?Angelo_H=c3=b6ngens?=) Date: Sun, 14 Feb 2016 13:17:33 +0100 Subject: talking proxy to backends In-Reply-To: References: <6A7ABA19243F1E4EADD8BB1563CDDCCB8A7581B3@TIL-EXCH-05.netmatch.local> Message-ID: <56C0705D.2030508@netmatch.nl> On 2/9/2016 5:32 PM, Per Buer wrote: > Hi Angelo, > > > On Tue, Feb 9, 2016 at 4:55 PM, Angelo H?ngens > wrote: > > I'm testing a new setup with varnish 4.1 and the proxy protocol. > Talking proxy works fine on the front-end, hitch talking to varnish > for ssl offloading. > > But can I also configure varnish to talk proxy to the backends? (I > want varnish to talk proxy to haproxy that's behind my varnishes). I > cannot seem to find any documentation or examples. > > > I've never heard of any reasons to do so. Varnish doesn't know how to > talk proxy to it's backend. > > Out of curiosity, why don't you want to speak HTTP to the backends? The > HTTP request that hits the backend should already have the information > carried in X-Forwarded-For. > > Per. Thanks for all your replies. Indeed, I use varnish in a setup where I run varnish sandwiched between other services. Varnish is used either directly in front, or behind nginx (for https offloading, to be replaced by hitch). Varnish passes every request to haproxy, which then decides based on all kinds of business logic where to pass the request. And yes, we currently use the X-Forwarded-For header there, and that works fine. But I was thinking the proxy proto might give me some more flexibility in passing around requests, and I was wanting to play with it. But if varnish doesn't support it (yet), that's fine. No real business case for us yet. Angelo. From michaeljones401 at gmail.com Mon Feb 15 10:05:55 2016 From: michaeljones401 at gmail.com (Mike Jones) Date: Mon, 15 Feb 2016 10:05:55 +0000 Subject: Varnish install on aws In-Reply-To: References: <56BF56B5.7050608@pobox.com> Message-ID: The output of ?bash -x /etc/init.d/varnish start? is http://pastebin.com/YiqFDgYJ vcl config from '/etc/varnish/default.vcl' is http://pastebin.com/wEideMfC Output of 'netstat -tulpn and iptables -vnL' is http://pastebin.com/n5TYJVH5 Thanks On Sat, Feb 13, 2016 at 7:33 PM, Tobias Honacker wrote: > Hi, > > please send the vcl config and the output of netstat -tulpn and iptables > -vnL > > > greetings > > 2016-02-13 17:56 GMT+01:00 Mike Jones : > >> I have a 'WordPress basic single instance' from >> http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html >> >> and my varnish file, located in /etc/sysconfig/varnish, looks like >> >> http://pastebin.com/hZNr6Apc >> >> While my httpd conf file, /etc/httpd/conf/httpd.conf, looks like >> >> http://pastebin.com/xeZs8KQq >> >> Running varnishstat looks like it's running but when visiting the >> webserver through the browser the page fails to load. >> >> On Sat, Feb 13, 2016 at 4:15 PM, Brad Tarver wrote: >> >>> 6082 is the admin port >>> >>> This is my config on ubuntu: http://pastebin.com/E3tQ1eC1 >>> >>> >>> >>> >>> >>> >>> -- >>> Brad Tarver >>> >>> >>> Mike Jones wrote: >>> >>> Yes, I was talking about the security group, I did open that but it >>> didn't make any difference. >>> >>> With the settings previously mentioned I tried running curl on port 80 >>> on I get >>> >>> curl: (7) Failed to connect to localhost port 80: Connection refused. >>> >>> On port 8080 I get the default apache page, but adding a directory after >>> the port 'curl 127.0.0.1:8080/wordpress' I get an error saying the page >>> has moved. >>> >>> On port 6082 I get 'Authentication required' >>> >>> >>> On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout wrote: >>> >>>> > Do I need to open port 8080 too? >>>> >>>> Open it where? In a security group? You should make sure you have port >>>> 80 open in your security group but that won't affect local host. >>>> >>>> You should try curling against the interfaces on the box from the box >>>> itself and make sure it's actually sending info back locally. With your >>>> config I believe you should be able to curl local host on port 80 as well >>>> since you only specified a listening port. >>>> >>>> On Saturday, February 13, 2016, Mike Jones >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> I have a single ec2 instance running and would like to install and >>>>> configure Varnish for that aws instance >>>>> >>>>> I've changed the default settings for varnish - /etc/sysconfig/varnish >>>>> >>>>> DAEMON_OPTS="-a :80 \ >>>>> -T localhost:6082 \ >>>>> -b localhost:8080 \ >>>>> -u varnish -g varnish \ >>>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>>> >>>>> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port >>>>> 8080 >>>>> >>>>> But when I restart both services, the webpage fails to load. >>>>> >>>>> There's nothing in the error_log and when I tail -f the access_log >>>>> nothing is logged when I refresh the page. >>>>> Do I need to open port 8080 too? >>>>> >>>>> Are there any guides on how to configure Varnish for an aws instance? >>>>> >>>>> Thanks >>>>> >>>> >>>> >>>> -- >>>> Sorry I fat thumbed this on an iPhone >>>> >>> >>> _______________________________________________ >>> varnish-misc mailing listvarnish-misc at varnish-cache.orghttps://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>> >>> >>> >> >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at varnish-cache.org >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.honacker at googlemail.com Mon Feb 15 10:45:01 2016 From: t.honacker at googlemail.com (Tobias Honacker) Date: Mon, 15 Feb 2016 11:45:01 +0100 Subject: Varnish install on aws In-Reply-To: References: <56BF56B5.7050608@pobox.com> Message-ID: FYI: Your backend listen on Port 8080, so you should define this in your varnish config (.vcl) in /etc/varnish 1. backend default { 2. .host = "127.0.0.1"; 3. .port = "8080"; 4. } Varnish Port 80 -> open port 80 on your firewall (Security Group AWS) Backend Port 8080 -> no need to open port 8080 on your firewall (Security Group AWS) So your /etc/sysconfig/varnish might look like: DAEMON_OPTS="-a :80 \ -f /etc/varnish/default.vcl \ T localhost:6082 \ -S /etc/varnish/secret \ -u varnish -g varnish \ -s file,/var/lib/varnish/varnish_storage.bin,1G" hint: with defining the backend in your config you do not need to specify this in your daemon_opts. If you type /etc/init.d/varnish restart and you get Stopping Varnish Cache: [FAILED] this might be because your varnish daemon is not alive and cant be stopped :) You should also read http://book.varnish-software.com/4.0/ 2016-02-15 11:05 GMT+01:00 Mike Jones : > The output of ?bash -x /etc/init.d/varnish start? is > http://pastebin.com/YiqFDgYJ > > vcl config from '/etc/varnish/default.vcl' is http://pastebin.com/wEideMfC > > Output of 'netstat -tulpn and iptables -vnL' is > http://pastebin.com/n5TYJVH5 > > Thanks > > On Sat, Feb 13, 2016 at 7:33 PM, Tobias Honacker < > t.honacker at googlemail.com> wrote: > >> Hi, >> >> please send the vcl config and the output of netstat -tulpn and iptables >> -vnL >> >> >> greetings >> >> 2016-02-13 17:56 GMT+01:00 Mike Jones : >> >>> I have a 'WordPress basic single instance' from >>> http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html >>> >>> and my varnish file, located in /etc/sysconfig/varnish, looks like >>> >>> http://pastebin.com/hZNr6Apc >>> >>> While my httpd conf file, /etc/httpd/conf/httpd.conf, looks like >>> >>> http://pastebin.com/xeZs8KQq >>> >>> Running varnishstat looks like it's running but when visiting the >>> webserver through the browser the page fails to load. >>> >>> On Sat, Feb 13, 2016 at 4:15 PM, Brad Tarver wrote: >>> >>>> 6082 is the admin port >>>> >>>> This is my config on ubuntu: http://pastebin.com/E3tQ1eC1 >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Brad Tarver >>>> >>>> >>>> Mike Jones wrote: >>>> >>>> Yes, I was talking about the security group, I did open that but it >>>> didn't make any difference. >>>> >>>> With the settings previously mentioned I tried running curl on port 80 >>>> on I get >>>> >>>> curl: (7) Failed to connect to localhost port 80: Connection refused. >>>> >>>> On port 8080 I get the default apache page, but adding a directory >>>> after the port 'curl 127.0.0.1:8080/wordpress' I get an error saying >>>> the page has moved. >>>> >>>> On port 6082 I get 'Authentication required' >>>> >>>> >>>> On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout wrote: >>>> >>>>> > Do I need to open port 8080 too? >>>>> >>>>> Open it where? In a security group? You should make sure you have port >>>>> 80 open in your security group but that won't affect local host. >>>>> >>>>> You should try curling against the interfaces on the box from the box >>>>> itself and make sure it's actually sending info back locally. With your >>>>> config I believe you should be able to curl local host on port 80 as well >>>>> since you only specified a listening port. >>>>> >>>>> On Saturday, February 13, 2016, Mike Jones >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I have a single ec2 instance running and would like to install and >>>>>> configure Varnish for that aws instance >>>>>> >>>>>> I've changed the default settings for varnish - /etc/sysconfig/varnish >>>>>> >>>>>> DAEMON_OPTS="-a :80 \ >>>>>> -T localhost:6082 \ >>>>>> -b localhost:8080 \ >>>>>> -u varnish -g varnish \ >>>>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>>>> >>>>>> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port >>>>>> 8080 >>>>>> >>>>>> But when I restart both services, the webpage fails to load. >>>>>> >>>>>> There's nothing in the error_log and when I tail -f the access_log >>>>>> nothing is logged when I refresh the page. >>>>>> Do I need to open port 8080 too? >>>>>> >>>>>> Are there any guides on how to configure Varnish for an aws instance? >>>>>> >>>>>> Thanks >>>>>> >>>>> >>>>> >>>>> -- >>>>> Sorry I fat thumbed this on an iPhone >>>>> >>>> >>>> _______________________________________________ >>>> varnish-misc mailing listvarnish-misc at varnish-cache.orghttps://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>> >>>> >>>> >>> >>> _______________________________________________ >>> varnish-misc mailing list >>> varnish-misc at varnish-cache.org >>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michaeljones401 at gmail.com Mon Feb 15 11:38:00 2016 From: michaeljones401 at gmail.com (Mike Jones) Date: Mon, 15 Feb 2016 11:38:00 +0000 Subject: Varnish install on aws In-Reply-To: References: <56BF56B5.7050608@pobox.com> Message-ID: Hi, I've changed the backend default back to 8080. Security group on aws for port 8080 isn't open. and changed /etc/sysconfig/varnish to DAEMON_OPTS="-a :80 \ -f /etc/varnish/default.vcl \ -T localhost:6082 \ -b localhost:8080 \ -u varnish -g varnish \ -s file,/var/lib/varnish/varnish_storage.bin,256m" When I run varnishstat I don't get any useful information 0+00:00:00 Hitrate ratio: 0 0 0 Hitrate avg: 0.0000 0.0000 0.0000 How do you start the varnish daemon? I've tried sudo `bash -x /etc/init.d/varnish restart` I get http://pastebin.com/pTikCS7Y and still nothing in varnishlog On Mon, Feb 15, 2016 at 10:45 AM, Tobias Honacker wrote: > FYI: Your backend listen on Port 8080, so you should define this in your > varnish config (.vcl) in /etc/varnish > > > 1. backend default { > 2. .host = "127.0.0.1"; > 3. .port = "8080"; > 4. } > > > Varnish Port 80 -> open port 80 on your firewall (Security Group AWS) > Backend Port 8080 -> no need to open port 8080 on your firewall (Security > Group AWS) > > So your /etc/sysconfig/varnish might look like: > > DAEMON_OPTS="-a :80 \ > -f /etc/varnish/default.vcl \ > T localhost:6082 \ > -S /etc/varnish/secret \ > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,1G" > > hint: with defining the backend in your config you do not need to specify > this in your daemon_opts. > > If you type /etc/init.d/varnish restart and you get Stopping Varnish > Cache: [FAILED] this might be because your varnish daemon is not alive and > cant be stopped :) > > You should also read http://book.varnish-software.com/4.0/ > > > 2016-02-15 11:05 GMT+01:00 Mike Jones : > >> The output of ?bash -x /etc/init.d/varnish start? is >> http://pastebin.com/YiqFDgYJ >> >> vcl config from '/etc/varnish/default.vcl' is >> http://pastebin.com/wEideMfC >> >> Output of 'netstat -tulpn and iptables -vnL' is >> http://pastebin.com/n5TYJVH5 >> >> Thanks >> >> On Sat, Feb 13, 2016 at 7:33 PM, Tobias Honacker < >> t.honacker at googlemail.com> wrote: >> >>> Hi, >>> >>> please send the vcl config and the output of netstat -tulpn and iptables >>> -vnL >>> >>> >>> greetings >>> >>> 2016-02-13 17:56 GMT+01:00 Mike Jones : >>> >>>> I have a 'WordPress basic single instance' from >>>> http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html >>>> >>>> and my varnish file, located in /etc/sysconfig/varnish, looks like >>>> >>>> http://pastebin.com/hZNr6Apc >>>> >>>> While my httpd conf file, /etc/httpd/conf/httpd.conf, looks like >>>> >>>> http://pastebin.com/xeZs8KQq >>>> >>>> Running varnishstat looks like it's running but when visiting the >>>> webserver through the browser the page fails to load. >>>> >>>> On Sat, Feb 13, 2016 at 4:15 PM, Brad Tarver wrote: >>>> >>>>> 6082 is the admin port >>>>> >>>>> This is my config on ubuntu: http://pastebin.com/E3tQ1eC1 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Brad Tarver >>>>> >>>>> >>>>> Mike Jones wrote: >>>>> >>>>> Yes, I was talking about the security group, I did open that but it >>>>> didn't make any difference. >>>>> >>>>> With the settings previously mentioned I tried running curl on port 80 >>>>> on I get >>>>> >>>>> curl: (7) Failed to connect to localhost port 80: Connection refused. >>>>> >>>>> On port 8080 I get the default apache page, but adding a directory >>>>> after the port 'curl 127.0.0.1:8080/wordpress' I get an error saying >>>>> the page has moved. >>>>> >>>>> On port 6082 I get 'Authentication required' >>>>> >>>>> >>>>> On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout wrote: >>>>> >>>>>> > Do I need to open port 8080 too? >>>>>> >>>>>> Open it where? In a security group? You should make sure you have >>>>>> port 80 open in your security group but that won't affect local host. >>>>>> >>>>>> You should try curling against the interfaces on the box from the box >>>>>> itself and make sure it's actually sending info back locally. With your >>>>>> config I believe you should be able to curl local host on port 80 as well >>>>>> since you only specified a listening port. >>>>>> >>>>>> On Saturday, February 13, 2016, Mike Jones >>>>>> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I have a single ec2 instance running and would like to install and >>>>>>> configure Varnish for that aws instance >>>>>>> >>>>>>> I've changed the default settings for varnish - >>>>>>> /etc/sysconfig/varnish >>>>>>> >>>>>>> DAEMON_OPTS="-a :80 \ >>>>>>> -T localhost:6082 \ >>>>>>> -b localhost:8080 \ >>>>>>> -u varnish -g varnish \ >>>>>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>>>>> >>>>>>> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port >>>>>>> 8080 >>>>>>> >>>>>>> But when I restart both services, the webpage fails to load. >>>>>>> >>>>>>> There's nothing in the error_log and when I tail -f the access_log >>>>>>> nothing is logged when I refresh the page. >>>>>>> Do I need to open port 8080 too? >>>>>>> >>>>>>> Are there any guides on how to configure Varnish for an aws instance? >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Sorry I fat thumbed this on an iPhone >>>>>> >>>>> >>>>> _______________________________________________ >>>>> varnish-misc mailing listvarnish-misc at varnish-cache.orghttps://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>>> >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> varnish-misc mailing list >>>> varnish-misc at varnish-cache.org >>>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michaeljones401 at gmail.com Mon Feb 15 11:56:12 2016 From: michaeljones401 at gmail.com (Mike Jones) Date: Mon, 15 Feb 2016 11:56:12 +0000 Subject: Varnish install on aws In-Reply-To: References: <56BF56B5.7050608@pobox.com> Message-ID: I've noticed that in /etc/varnish/secret that it's empty And running start and then status gives me varnishd dead but pid file exists [ec2-user at ip-xxx-xx-xx-xx httpd]$ sudo service varnish start Starting Varnish Cache: [ OK ] [ec2-user at ip-xxx-xx-xx-xx httpd]$ sudo service varnish status varnishd dead but pid file exists On Mon, Feb 15, 2016 at 11:38 AM, Mike Jones wrote: > Hi, > > I've changed the backend default back to 8080. > > Security group on aws for port 8080 isn't open. > > and changed /etc/sysconfig/varnish to > > DAEMON_OPTS="-a :80 \ > -f /etc/varnish/default.vcl \ > -T localhost:6082 \ > -b localhost:8080 \ > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,256m" > > When I run varnishstat I don't get any useful information > > 0+00:00:00 > Hitrate ratio: 0 0 0 > Hitrate avg: 0.0000 0.0000 0.0000 > > How do you start the varnish daemon? I've tried sudo `bash -x > /etc/init.d/varnish restart` I get http://pastebin.com/pTikCS7Y and > still nothing in varnishlog > > On Mon, Feb 15, 2016 at 10:45 AM, Tobias Honacker < > t.honacker at googlemail.com> wrote: > >> FYI: Your backend listen on Port 8080, so you should define this in your >> varnish config (.vcl) in /etc/varnish >> >> >> 1. backend default { >> 2. .host = "127.0.0.1"; >> 3. .port = "8080"; >> 4. } >> >> >> Varnish Port 80 -> open port 80 on your firewall (Security Group AWS) >> Backend Port 8080 -> no need to open port 8080 on your firewall (Security >> Group AWS) >> >> So your /etc/sysconfig/varnish might look like: >> >> DAEMON_OPTS="-a :80 \ >> -f /etc/varnish/default.vcl \ >> T localhost:6082 \ >> -S /etc/varnish/secret \ >> -u varnish -g varnish \ >> -s file,/var/lib/varnish/varnish_storage.bin,1G" >> >> hint: with defining the backend in your config you do not need to specify >> this in your daemon_opts. >> >> If you type /etc/init.d/varnish restart and you get Stopping Varnish >> Cache: [FAILED] this might be because your varnish daemon is not alive and >> cant be stopped :) >> >> You should also read http://book.varnish-software.com/4.0/ >> >> >> 2016-02-15 11:05 GMT+01:00 Mike Jones : >> >>> The output of ?bash -x /etc/init.d/varnish start? is >>> http://pastebin.com/YiqFDgYJ >>> >>> vcl config from '/etc/varnish/default.vcl' is >>> http://pastebin.com/wEideMfC >>> >>> Output of 'netstat -tulpn and iptables -vnL' is >>> http://pastebin.com/n5TYJVH5 >>> >>> Thanks >>> >>> On Sat, Feb 13, 2016 at 7:33 PM, Tobias Honacker < >>> t.honacker at googlemail.com> wrote: >>> >>>> Hi, >>>> >>>> please send the vcl config and the output of netstat -tulpn and >>>> iptables -vnL >>>> >>>> >>>> greetings >>>> >>>> 2016-02-13 17:56 GMT+01:00 Mike Jones : >>>> >>>>> I have a 'WordPress basic single instance' from >>>>> http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html >>>>> >>>>> and my varnish file, located in /etc/sysconfig/varnish, looks like >>>>> >>>>> http://pastebin.com/hZNr6Apc >>>>> >>>>> While my httpd conf file, /etc/httpd/conf/httpd.conf, looks like >>>>> >>>>> http://pastebin.com/xeZs8KQq >>>>> >>>>> Running varnishstat looks like it's running but when visiting the >>>>> webserver through the browser the page fails to load. >>>>> >>>>> On Sat, Feb 13, 2016 at 4:15 PM, Brad Tarver wrote: >>>>> >>>>>> 6082 is the admin port >>>>>> >>>>>> This is my config on ubuntu: http://pastebin.com/E3tQ1eC1 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Brad Tarver >>>>>> >>>>>> >>>>>> Mike Jones wrote: >>>>>> >>>>>> Yes, I was talking about the security group, I did open that but it >>>>>> didn't make any difference. >>>>>> >>>>>> With the settings previously mentioned I tried running curl on port >>>>>> 80 on I get >>>>>> >>>>>> curl: (7) Failed to connect to localhost port 80: Connection refused. >>>>>> >>>>>> On port 8080 I get the default apache page, but adding a directory >>>>>> after the port 'curl 127.0.0.1:8080/wordpress' I get an error saying >>>>>> the page has moved. >>>>>> >>>>>> On port 6082 I get 'Authentication required' >>>>>> >>>>>> >>>>>> On Sat, Feb 13, 2016 at 1:41 PM, Lee Trout wrote: >>>>>> >>>>>>> > Do I need to open port 8080 too? >>>>>>> >>>>>>> Open it where? In a security group? You should make sure you have >>>>>>> port 80 open in your security group but that won't affect local host. >>>>>>> >>>>>>> You should try curling against the interfaces on the box from the >>>>>>> box itself and make sure it's actually sending info back locally. With your >>>>>>> config I believe you should be able to curl local host on port 80 as well >>>>>>> since you only specified a listening port. >>>>>>> >>>>>>> On Saturday, February 13, 2016, Mike Jones < >>>>>>> michaeljones401 at gmail.com> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I have a single ec2 instance running and would like to install and >>>>>>>> configure Varnish for that aws instance >>>>>>>> >>>>>>>> I've changed the default settings for varnish - >>>>>>>> /etc/sysconfig/varnish >>>>>>>> >>>>>>>> DAEMON_OPTS="-a :80 \ >>>>>>>> -T localhost:6082 \ >>>>>>>> -b localhost:8080 \ >>>>>>>> -u varnish -g varnish \ >>>>>>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>>>>>> >>>>>>>> and configured httpd - /etc/httpd/conf/httpd.conf to listen on port >>>>>>>> 8080 >>>>>>>> >>>>>>>> But when I restart both services, the webpage fails to load. >>>>>>>> >>>>>>>> There's nothing in the error_log and when I tail -f the access_log >>>>>>>> nothing is logged when I refresh the page. >>>>>>>> Do I need to open port 8080 too? >>>>>>>> >>>>>>>> Are there any guides on how to configure Varnish for an aws >>>>>>>> instance? >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Sorry I fat thumbed this on an iPhone >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> varnish-misc mailing listvarnish-misc at varnish-cache.orghttps://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>>>> >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> varnish-misc mailing list >>>>> varnish-misc at varnish-cache.org >>>>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>>> >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.bailey at apps4u.co Tue Feb 16 18:51:43 2016 From: andrew.bailey at apps4u.co (Andrew Bailey) Date: Tue, 16 Feb 2016 13:51:43 -0500 Subject: Implementing esi onerror="continue" in vcl_backend_response using synthetic Message-ID: Hi, I am using varnish 4.1 and would like to implement something similar to which does not appear to be supported yet. I have: sub vcl_backend_response { if (bereq.url ~ "-head.html$" && beresp.status==404) #if (req.esi_level>0 && beresp.status==404) //Commented as Variable not available { #set beresp.status = 700; //this is for attempts to forward to vcl_synth set beresp.status = 200; set beresp.http.Content-Type = "text/html; charset=utf-8"; set beresp.reason="esi include failed with a 404"; #synthetic(""); # not a valid action from method #call vcl_synth; # still cant use synthetic #call vcl_backend_error; #ditto return (deliver); } I think it should be valid to call synthetic here, any chance of this for a future version? Also I tried to see if it is in the middle of esi processing using req.esi_level however that is not available in this method. I have tried several workarounds return(synth ...) call vcl_synth but no luck. Can anyone provide a working solution. thanks in advance Andrew Bailey -------------- next part -------------- An HTML attachment was scrubbed... URL: From Drew.AJ at principal.com Wed Feb 17 12:43:31 2016 From: Drew.AJ at principal.com (Drew, AJ) Date: Wed, 17 Feb 2016 12:43:31 +0000 Subject: Varnish-Agent Fails if Varnish Task Started using Param Flag on Command Message-ID: <18f5fc5d8239472598931b89e0cfac12@PFGDSMMSG001.principalusa.corp.principal.com> Hello, In both version 4.0 and 4.1 of Varnish and the v4 version of the Varnish-agent I have run across the problem where the Varnish-agent will terminate itself. This happens if I use the '-p' flag to override or supply a value for a varnish parameter on startup. I am running Redhat v6 using Apache 2.2. The error in the log looks like this: Feb 16 10:43:06 ul2378 varnishd[17403]: CLI telnet 127.0.0.1 56983 127.0.0.1 6082 Rd param.show -l Feb 16 10:43:06 ul2378 varnishd[17403]: CLI telnet 127.0.0.1 56983 127.0.0.1 6082 Wr 200 accept_filter#012 Value is: off [bool] (default)#012#012 Enable kernel accept-filters (if available in the kernel).#012#012 NB: This parameter will not take any effect until the child#012 process has been restarted.#012#012acceptor_sleep_decay#012 Value is: 0.9 (default)#012 Minimum is: 0#012 Maximum is: 1#012#012 If we run out of resources, such as file descriptors or worker#012 threads, the acceptor will sleep between accepts.#012 This parameter (multiplicatively) reduce the sleep duration for#012 each successful accept. (ie: 0.9 = reduce by 10%)#012#012 NB: We do not know yet if it is a good idea to change this#012 parameter, or if the default value is even sensible. Caution#012 is advised, and feedback is most welcome.#012#012acceptor_sleep_incr#012 Value is: 0.000 [seconds] (default)#012 Minimum is: 0.000#012 Maximum is: 1.000#012#012 If we run out of resources, such as file descriptors or worker#012 threads, the acceptor will sleep between accepts.#012 This parameter control how much longer we sleep, each time we#012 fail to accept a new connection.#012#012 NB: We do not know yet if it is a good idea to change this#012 parameter, or if the default value is even sensible. Caution#012 is advised, and feedback is most welcome.#012#012acceptor_sleep_max#012 Value is: 0.050 [seconds] (default)#012 Minimum is: 0.000#012 Maximum is: 10.000#012#012 If we run out of resources, such as file descriptors or worker#012 threads, the acceptor will sleep between accepts.#012 This parameter limits how long it can sleep between attempts to#012 accept new connections.#012#012 NB: We do not know yet if it is a good idea to change this#012 parameter, or if the default value is even sensible. Caution#012 Feb 16 10:43:06 ul2378 varnish-agent[29721]: modules/vparams.c:171: vparams_show_json: Assertion `term' failed. Aborting. In this case the 3 params that I was overriding were: -p thread_pool_min=${VARNISH_MIN_THREADS} \ -p thread_pool_max=${VARNISH_MAX_THREADS} \ -p thread_pool_timeout=${VARNISH_THREAD_TIMEOUT} \ In my /etc/sysconfig/varnish file, I had: # # The minimum number of worker threads to start VARNISH_MIN_THREADS=50 # # # The Maximum number of worker threads to start VARNISH_MAX_THREADS=1000 # # # Idle timeout for worker threads VARNISH_THREAD_TIMEOUT=120 ... # # DAEMON_OPTS is used by the init script. If you add or remove options, make # # sure you update this section, too. DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ -f ${VARNISH_VCL_CONF} \ -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ -t ${VARNISH_TTL} \ -p thread_pool_min=${VARNISH_MIN_THREADS} \ -p thread_pool_max=${VARNISH_MAX_THREADS} \ -p thread_pool_timeout=${VARNISH_THREAD_TIMEOUT} \ -n "varnish_pcom" \ -S ${VARNISH_SECRET_FILE} \ -s ${VARNISH_STORAGE}" If I remove the 3 '-p' lines, everything works just fine. I thought I would share this information. Thanks! A J Drew -----Message Disclaimer----- This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to Connect at principal.com and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation. Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message. If you no longer wish to receive any further solicitation from the Principal Financial Group you may unsubscribe at https://www.principal.com/do-not-contact-form any time. If you are a Canadian resident and no longer wish to receive commercial electronic messages you may unsubscribe at https://www.principal.com/do-not-email-request-canadian-residents any time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tom.Anheyer at Berlinonline.de Wed Feb 17 16:23:10 2016 From: Tom.Anheyer at Berlinonline.de (Tom Anheyer) Date: Wed, 17 Feb 2016 17:23:10 +0100 Subject: Implementing esi onerror="continue" in vcl_backend_response using synthetic In-Reply-To: References: Message-ID: <56C49E6E.5010209@Berlinonline.de> Hi we use something like: sub vcl_deliver { # reformat errors in ESI requests if ( resp.status >= 300 && (req.esi_level > 0 || req.http.X-Esi ~ "\d") ) { return(synth(resp.status,resp.reason)); } } sub vcl_synth { ... if ( req.esi_level > 0 || req.http.X-Esi ~ "\d" ) { synthetic(""); } else { ... } return(deliver); } tom Am 16.02.2016 um 19:51 schrieb Andrew Bailey: > Hi, > > I am using varnish 4.1 and would like to implement something similar to > > > > which does not appear to be supported yet. > > I have: > > sub vcl_backend_response { > if (bereq.url ~ "-head.html$" && beresp.status==404) > #if (req.esi_level>0 && beresp.status==404) //Commented as > Variable not available > { > #set beresp.status = 700; //this is for attempts to > forward to vcl_synth > set beresp.status = 200; > set beresp.http.Content-Type = "text/html; charset=utf-8"; > set beresp.reason="esi include failed with a 404"; > #synthetic(""); > # not a valid action from method > #call vcl_synth; # still cant use synthetic > #call vcl_backend_error; #ditto > return (deliver); > } > > I think it should be valid to call synthetic here, any chance of this > for a future version? > > Also I tried to see if it is in the middle of esi processing using > req.esi_level however that is not available in this method. > > I have tried several workarounds > return(synth ...) > call vcl_synth > but no luck. > > Can anyone provide a working solution. > > > thanks in advance > > Andrew Bailey > > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4266 bytes Desc: S/MIME Cryptographic Signature URL: From Werner.Graalmann at t-systems.com Thu Feb 18 10:53:43 2016 From: Werner.Graalmann at t-systems.com (Werner.Graalmann at t-systems.com) Date: Thu, 18 Feb 2016 11:53:43 +0100 Subject: Can't compile varnish-cache on SPARC Message-ID: Hi, we have to compile varnish-cache 3.0.7 on a Solaris SPARC system. Operating system is SunOS 11.1. Compiler we have to use is SolarisStudio 12.3. Configure runs into following error: checking for gcc... (cached) suncc -m64 -xc99=all checking whether we are using the GNU C compiler... (cached) no checking whether suncc -m64 -xc99=all accepts -g... (cached) yes checking for suncc -m64 -xc99=all option to accept ISO C89... (cached) none needed checking dependency style of suncc -m64 -xc99=all... (cached) none checking for suncc -m64 -xc99=all option to accept ISO C99... none needed checking for suncc -m64 -xc99=all option to accept ISO Standard C... (cached) none needed configure: error: Could not find a C99 compatible compiler We call: CC="suncc -m64 -xc99=all" CXX='CC' CFLAGS='-m64 -fast -g -mt' CXXFLAGS='-g0 -m64' CPPFLAGS=" -I/usr/sfw/include" ./configure --prefix=/pkg/our_path I think, it should work with xc99=all as compiler option for using ISO C99, but "configure" always breaks with "Could not find a C99 compatible compiler". On Oracles "SolarisStudio-Webpage" I can't find any hints. Is it an issue with configure-Script from varnish? Many thanks for any help in advance. Kind regards Werner Graalmann -------------- next part -------------- An HTML attachment was scrubbed... URL: From dridi at varni.sh Thu Feb 18 16:39:34 2016 From: dridi at varni.sh (Dridi Boukelmoune) Date: Thu, 18 Feb 2016 17:39:34 +0100 Subject: Can't compile varnish-cache on SPARC In-Reply-To: References: Message-ID: On Thu, Feb 18, 2016 at 11:53 AM, wrote: > Hi, > > we have to compile varnish-cache 3.0.7 on a Solaris SPARC system. Operating > system is SunOS 11.1. Compiler we have to use is SolarisStudio 12.3. Hi Werner, Please note that Varnish 3 is no longer supported, consider upgrading to 4.x instead. > Configure runs into following error: > > checking for gcc... (cached) suncc -m64 -xc99=all > checking whether we are using the GNU C compiler... (cached) no > checking whether suncc -m64 -xc99=all accepts -g... (cached) yes > checking for suncc -m64 -xc99=all option to accept ISO C89... (cached) none > needed > checking dependency style of suncc -m64 -xc99=all... (cached) none > checking for suncc -m64 -xc99=all option to accept ISO C99... none needed > checking for suncc -m64 -xc99=all option to accept ISO Standard C... > (cached) none needed > configure: error: Could not find a C99 compatible compiler > > We call: > CC="suncc -m64 -xc99=all" > CXX='CC' The value you assign to CXX looks odd. Are you copying CC to CXX? I'd do CXX="$CC" Regardless, there's no C++ code in Varnish, it's probably not necessary. > CFLAGS='-m64 -fast -g -mt' > CXXFLAGS='-g0 -m64' > CPPFLAGS=" -I/usr/sfw/include" > ./configure --prefix=/pkg/our_path > > I think, it should work with xc99=all as compiler option for using ISO C99, > but ?configure? always breaks with ?Could not find a C99 compatible > compiler?. On Oracles ?SolarisStudio-Webpage? I can?t find any hints. Is it > an issue with configure-Script from varnish? If you think it's a false positive, you can always try to disable this check and see how the compilation goes. Best Regards, Dridi From christian.gerdes at lightsinline.com Mon Feb 22 17:07:17 2016 From: christian.gerdes at lightsinline.com (Christian Gerdes) Date: Mon, 22 Feb 2016 17:07:17 +0000 Subject: SV: Question on varnishstat output in 4.1 Message-ID: I'm running a fresh install of Varnish 4.1 on RedHat EL6 (installed from varnish repo). I need some clarification on the varnishstat output. After running for 1000 seconds, with 1 sec update interval, the ncurses stats for hitratio say about 0,63, 0.55 and 0.61, for avg(n) for 10, 100 and 1000 respectivly. However, when I manually calculate the cache hit ratio, I get a lot higher values, and I can not understand how these avg(n) hitratio metrics are calculated. For example, in the same screenshot with all values, MAIN.cache_hit is 303.5 per second, and MAIN.cache_miss is only 4.4 (for 1000). Thats a hit ratio of 98,6% something in percent when compared to MAIN.client_req wich for 1000 is 307.92 per second. I have configured grace, with quite a high grace time compared to TTL, so I figured the hitratio is calculated based on client requests and actual backend requests, since a graced response can be considered a cache hit but would trigger a backend request, but that is a lot higher as well. MAIN.backend_req was for 1000 at 46.56 per second. Compared to client_req thats a hit ratio of 84.9%. So please explain how the numbers for Avg(n) are calculated. I could not find any counters that could arrive at a low hitrate as 61% nor any explaination anywhere in the documentation or online (except that 1.0 means 100% hitratio and it can't get better than that but you can have backend requests anyway because pass in recv does not count as a cache miss) and that was for Varnish 2.x in Kristian Lyngstols blog. By the way, the avg(n) stats are not explained or mentioned at all in varnish-counters man7 page nor in the varnishstat man pages. Maybe they should ;) Cheers! From georgi.int at gmail.com Fri Feb 26 10:01:57 2016 From: georgi.int at gmail.com (georgi.int at gmail.com) Date: Fri, 26 Feb 2016 12:01:57 +0200 Subject: Varnish url redirection does not work Message-ID: <56D02295.7020000@gmail.com> Hello, I would like to ask your for help after explaining the case and the infrastructure for this domain. In the varnish configuration I restrict some types of files to be accessed and downloaded and if some customer wants to use this functionality I configure subdomain on it's domain on nginx where these restrictions are not present. Although, my customer do not want to change the links to the new subdomains (which rely on nginx) in it's application and I want to redirect all old urls (domain.com/somedir/download) to the new one - download.thedomain.com, so if someone open the old url it's redirected to the subdomain on nginx and the content to be loaded from nginx, not varnish (as the way cpanel domain forwarder works). The problem is that when I followed and configured the varnish official documentation url guide it just change the url in varnishlog, but the content is again openef from varnish, not nginx, also the url in the browser is not rewritten. My questions are 1) is it possible and if yes how, but if not 2) what workaround can I use? Thank you in advance. I will wait for you reply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pprocacci at datapipe.com Fri Feb 26 19:45:08 2016 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Fri, 26 Feb 2016 14:45:08 -0500 Subject: Varnish url redirection does not work In-Reply-To: <56D02295.7020000@gmail.com> References: <56D02295.7020000@gmail.com> Message-ID: <20160226194508.GE68867@workvm.myhome> On Fri, Feb 26, 2016 at 12:01:57PM +0200, georgi.int at gmail.com wrote: > Hello, > I would like to ask your for help after explaining the case and the > infrastructure for this domain. In the varnish configuration I restrict > some types of files to be accessed and downloaded and if some customer > wants to use this functionality I configure subdomain on it's domain on > nginx where these restrictions are not present. Although, my customer > do not want to change the links to the new subdomains (which rely on > nginx) in it's application and I want to redirect all old urls > (domain.com/somedir/download) to the new one - download.thedomain.com, > so if someone open the old url it's redirected to the subdomain on > nginx and the content to be loaded from nginx, not varnish (as the way > cpanel domain forwarder works). > The problem is that when I followed and configured the varnish official > documentation url guide it just change the url in varnishlog, but the > content is again openef from varnish, not nginx, also the url in the > browser is not rewritten. > My questions are 1) is it possible and if yes how, but if not 2) what > workaround can I use? > Thank you in advance. I will wait for you reply. Hello, It'd be helpful if you shared the parts of your configuration which perform the rewriting of the url. That aside, in order for the browser to request a differnet resource requires a 301 (or similar) to be delivered from varnish or nginx. Here's an example: ##################################################### sub vcl_recv { if(req.http.host ~ "(?i)^nothere\.com$"){ if(req.url ~ "(i?)^/file\.jpg$") { return(synth(750, "http://here.com" + req.url)); } } } sub vcl_synth { if(resp.status == 750){ set resp.http.Location = resp.reason; set resp.status = 301; return (deliver); } } ##################################################### Hope this helps. ~Paul From idle at pobox.com Fri Feb 26 23:15:54 2016 From: idle at pobox.com (Brad Tarver) Date: Fri, 26 Feb 2016 17:15:54 -0600 Subject: Varnish url redirection does not work In-Reply-To: <20160226194508.GE68867@workvm.myhome> References: <56D02295.7020000@gmail.com> <20160226194508.GE68867@workvm.myhome> Message-ID: <56D0DCAA.7030107@pobox.com> Just yesterday I needed to do this. I host a friend's personal blog. Originally I had a line in my default.vcl that sent any queries for example.org/.info/.net to the nginx backend on the same machine. However, I like yours better. It is simpler in execution than mine. Old: vcl_recv { if (req.http.host == "(www.)example.\borg|info|net\b" ) { set req.backend_hint = default; } } This is a wordpress site mind you. He noticed this issue yesterday and sent me a text. He updated his site @ example.org/wordpress/wp-admin/. Someone he works with asked about his blog and he replied with "example.net." Well, when his coworker when to example.net, my friend's new post wasn't there. Surf to example.org and there sits the new post. So, this tells me that varnish is keeping a separate cache for each domain.tld of my friend's blog even though it's derived from the same WP install. New: vcl_recv { if (req.http.host == "(www.)example.org") { set req.backend_hint = default; } if ( (req.http.host ~ "^(?i)www.example.net" || req.http.host ~ "^(?i)example.net" || req.http.host ~ "^(?i)www.example.info" || req.http.host ~ "^(?i)example.info") ) { return (synth(750, "")); } } sub vcl_synth { if (resp.status == 750) { set resp.status = 301; set resp.http.Location = "http://www.example.org" + req.url; return(deliver); } } I tested using curl -I and chrome and both worked wonderfully. I'm going to try out your example and see what I get. Thank you -- Sent from Postbox Paul A. Procacci wrote: > On Fri, Feb 26, 2016 at 12:01:57PM +0200, georgi.int at gmail.com wrote: >> Hello, >> I would like to ask your for help after explaining the case and the >> infrastructure for this domain. In the varnish configuration I restrict >> some types of files to be accessed and downloaded and if some customer >> wants to use this functionality I configure subdomain on it's domain on >> nginx where these restrictions are not present. Although, my customer >> do not want to change the links to the new subdomains (which rely on >> nginx) in it's application and I want to redirect all old urls >> (domain.com/somedir/download) to the new one - download.thedomain.com, >> so if someone open the old url it's redirected to the subdomain on >> nginx and the content to be loaded from nginx, not varnish (as the way >> cpanel domain forwarder works). >> The problem is that when I followed and configured the varnish official >> documentation url guide it just change the url in varnishlog, but the >> content is again openef from varnish, not nginx, also the url in the >> browser is not rewritten. >> My questions are 1) is it possible and if yes how, but if not 2) what >> workaround can I use? >> Thank you in advance. I will wait for you reply. > > Hello, > > It'd be helpful if you shared the parts of your configuration which perform > the rewriting of the url. > > That aside, in order for the browser to request a differnet resource requires > a 301 (or similar) to be delivered from varnish or nginx. Here's an example: > > ##################################################### > sub vcl_recv > { > if(req.http.host ~ "(?i)^nothere\.com$"){ > if(req.url ~ "(i?)^/file\.jpg$") { > return(synth(750, "http://here.com" + req.url)); > } > } > } > > sub vcl_synth > { > if(resp.status == 750){ > set resp.http.Location = resp.reason; > set resp.status = 301; > return (deliver); > } > } > ##################################################### > > Hope this helps. > > ~Paul > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc -------------- next part -------------- An HTML attachment was scrubbed... URL: From georgi.int at gmail.com Sun Feb 28 15:13:04 2016 From: georgi.int at gmail.com (georgi.int at gmail.com) Date: Sun, 28 Feb 2016 17:13:04 +0200 Subject: Varnish url redirection does not work In-Reply-To: <20160226194508.GE68867@workvm.myhome> References: <56D02295.7020000@gmail.com> <20160226194508.GE68867@workvm.myhome> Message-ID: <56D30E80.5010003@gmail.com> Thank you about your reply. I am using varnish 3 and tried the following configuration: if (req.http.host ~ "thedomain\.com" && req.url~ "^/disclib/download/") { set req.backend = filedownload; set req.http.connection = "close"; return (pipe); } as I defined befor the backend filedownload, but the result is service unavailable. Any other suggestions? On 02/26/2016 09:45 PM, Paul A. Procacci wrote: > On Fri, Feb 26, 2016 at 12:01:57PM +0200, georgi.int at gmail.com wrote: >> Hello, >> I would like to ask your for help after explaining the case and the >> infrastructure for this domain. In the varnish configuration I restrict >> some types of files to be accessed and downloaded and if some customer >> wants to use this functionality I configure subdomain on it's domain on >> nginx where these restrictions are not present. Although, my customer >> do not want to change the links to the new subdomains (which rely on >> nginx) in it's application and I want to redirect all old urls >> (domain.com/somedir/download) to the new one - download.thedomain.com, >> so if someone open the old url it's redirected to the subdomain on >> nginx and the content to be loaded from nginx, not varnish (as the way >> cpanel domain forwarder works). >> The problem is that when I followed and configured the varnish official >> documentation url guide it just change the url in varnishlog, but the >> content is again openef from varnish, not nginx, also the url in the >> browser is not rewritten. >> My questions are 1) is it possible and if yes how, but if not 2) what >> workaround can I use? >> Thank you in advance. I will wait for you reply. > Hello, > > It'd be helpful if you shared the parts of your configuration which perform > the rewriting of the url. > > That aside, in order for the browser to request a differnet resource requires > a 301 (or similar) to be delivered from varnish or nginx. Here's an example: > > ##################################################### > sub vcl_recv > { > if(req.http.host ~ "(?i)^nothere\.com$"){ > if(req.url ~ "(i?)^/file\.jpg$") { > return(synth(750, "http://here.com" + req.url)); > } > } > } > > sub vcl_synth > { > if(resp.status == 750){ > set resp.http.Location = resp.reason; > set resp.status = 301; > return (deliver); > } > } > ##################################################### > > Hope this helps. > > ~Paul From idle at pobox.com Sun Feb 28 16:48:33 2016 From: idle at pobox.com (Brad Tarver) Date: Sun, 28 Feb 2016 10:48:33 -0600 Subject: Varnish url redirection does not work In-Reply-To: <56D30E80.5010003@gmail.com> References: <56D02295.7020000@gmail.com> <20160226194508.GE68867@workvm.myhome> <56D30E80.5010003@gmail.com> Message-ID: <56D324E1.4010207@pobox.com> from https://stackoverflow.com/questions/15597174/varnish-redirection In vcl_recv: |set req.http.x-Redir-Url = "http://newdomain.com" + req.url; error 750 req.http.x-Redir-Url; | In vcl_error: |if (obj.status == 750) { set obj.http.Location = obj.response; set obj.status = 301; return(deliver); } | -- Sent from Postbox georgi.int at gmail.com wrote: > Thank you about your reply. I am using varnish 3 and tried the > following configuration: > > if (req.http.host ~ "thedomain\.com" && req.url~ > "^/disclib/download/") { set req.backend = filedownload; set > req.http.connection = "close"; return (pipe); } > > as I defined befor the backend filedownload, but the result is service > unavailable. > > Any other suggestions? -------------- next part -------------- An HTML attachment was scrubbed... URL: From georgi.int at gmail.com Sun Feb 28 17:02:29 2016 From: georgi.int at gmail.com (georgi.int at gmail.com) Date: Sun, 28 Feb 2016 19:02:29 +0200 Subject: Varnish url redirection does not work In-Reply-To: <56D324E1.4010207@pobox.com> References: <56D02295.7020000@gmail.com> <20160226194508.GE68867@workvm.myhome> <56D30E80.5010003@gmail.com> <56D324E1.4010207@pobox.com> Message-ID: <56D32825.40503@gmail.com> I tried this, but it gives me a white page, maybe because this + req.url do so that adds unneeded part to the subdomain to where redirects, but and without it it does not work again and the url is loaded from the varnish not from the nginx. I tried also with nginx as a backend, but without result Here is the log: 0 Debug - "VCL_error(750, http://dowmload.thedomain.com/disclib/download/)" 15 SessionOpen c MYIP 60312 91.215.216.24:80 15 ReqStart c MYIP 60312 2028169630 15 RxRequest c GET 15 RxURL c /disclib/download/ 15 RxProtocol c HTTP/1.1 15 RxHeader c Host: thedomain.com 15 RxHeader c User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:44.0) Gecko/20100101 Firefox/44.0 15 RxHeader c Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 15 RxHeader c Accept-Language: en-US,en;q=0.5 15 RxHeader c Accept-Encoding: gzip, deflate 15 RxHeader c Cookie: _ga=GA1.2.131807001.1456298754; __utma=234754435.782204057.1456320697.1456320697.1456325696.2; __utmz=234754435.1456320697.1.1.utmccn=(dire$ 15 RxHeader c Connection: keep-alive 15 RxHeader c Cache-Control: max-age=0 15 VCL_call c recv error 15 VCL_call c hash 15 Hash c /disclib/download/ 15 Hash c thedomain.com 15 VCL_return c hash 15 VCL_call c error deliver 15 VCL_call c deliver deliver 15 TxProtocol c HTTP/1.1 15 TxStatus c 750 15 TxResponse c http://dowmload.thedomain.com/disclib/download/ 15 TxHeader c Server: Varnish 15 TxHeader c Accept-Ranges: bytes 15 TxHeader c Date: Sun, 28 Feb 2016 16:57:05 GMT 15 TxHeader c Connection: close 15 Length c 0 15 ReqEnd c 2028169630 1456678625.208791018 1456678625.208868742 0.000070572 0.000038147 0.000039577 15 SessionClose c error 15 StatSess c MYIP 60312 0 1 1 0 0 0 162 0 14 SessionClose - timeout 14 StatSess - 66.249.64.41 36669 0 1 1 0 1 1 235 61420 0 Debug - "VCL_error(750, http://dowmload.thedomain.com/disclib/download/)" 14 SessionOpen c MYIP 60314 91.215.216.24:80 14 ReqStart c MYIP 60314 2028169631 14 RxRequest c GET 14 RxURL c /disclib/download/ 14 RxProtocol c HTTP/1.1 14 RxHeader c Host: thedomain.com 14 RxHeader c User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:44.0) Gecko/20100101 Firefox/44.0 14 RxHeader c Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 On 02/28/2016 06:48 PM, Brad Tarver wrote: > |if (obj.status == 750) { set obj.http.Location = obj.response; set > obj.status = 301; return(deliver); }| -------------- next part -------------- An HTML attachment was scrubbed... URL: