{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/6289","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/6289/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/6289/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/6289/events","html_url":"https://github.com/magento/magento2/issues/6289","id":172695697,"number":6289,"title":"Varnish not working","user":{"login":"LS-Supriya","id":17175033,"avatar_url":"https://avatars1.githubusercontent.com/u/17175033?v=4","gravatar_id":"","url":"https://api.github.com/users/LS-Supriya","html_url":"https://github.com/LS-Supriya","followers_url":"https://api.github.com/users/LS-Supriya/followers","following_url":"https://api.github.com/users/LS-Supriya/following{/other_user}","gists_url":"https://api.github.com/users/LS-Supriya/gists{/gist_id}","starred_url":"https://api.github.com/users/LS-Supriya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LS-Supriya/subscriptions","organizations_url":"https://api.github.com/users/LS-Supriya/orgs","repos_url":"https://api.github.com/users/LS-Supriya/repos","events_url":"https://api.github.com/users/LS-Supriya/events{/privacy}","received_events_url":"https://api.github.com/users/LS-Supriya/received_events","type":"User","site_admin":false},"labels":[{"id":147131376,"url":"https://api.github.com/repos/magento/magento2/labels/bug%20report","name":"bug report","color":"d93f0b","default":false},{"id":686477690,"url":"https://api.github.com/repos/magento/magento2/labels/Cannot%20Reproduce","name":"Cannot Reproduce","color":"d93f0b","default":false},{"id":688811200,"url":"https://api.github.com/repos/magento/magento2/labels/G1%20Passed","name":"G1 Passed","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-23T13:14:28Z","updated_at":"2017-10-25T11:23:57Z","closed_at":null,"author_association":"NONE","body":"<!--- Provide a general summary of the issue in the Title above -->\n\n<!--- Before adding new issues, please, check this article https://github.com/magento/magento2/wiki/Issue-reporting-guidelines-->\n### Preconditions\n\n<!--- Provide a more detailed information of environment you use -->\n\n<!--- Magento version, tag, HEAD, etc., PHP & MySQL version, etc.. -->\n1. Install Varnish\n2. Magento Version :2.0.5\n### Steps to reproduce\n\n<!--- Provide a set of unambiguous steps to reproduce this bug include code, if relevant  -->\n1. Configured varnish as per http://devdocs.magento.com/guides/v2.0/config-guide/varnish/config-varnish-magento.html\n2. After replacing vcl file generated by magento, I don't see X-Varnish response headers \n3. I can see \"X-Varnish response headers\" when I use default vcl generated by varnish\n### Expected result\n\n<!--- Tell us what should happen -->\n1. Varnish must work after replacing the vcl file generated by magento\n### Actual result\n\n<!--- Tell us what happens instead -->\n1. Varnish stops working after replacing vcl file generated by Magento\n## My Vcl File (generated by Magento):\n\nvcl 4.0;\n\nimport std;\n# The minimal Varnish version is 4.0\n\nbackend default {\n    .host = \"127.0.0.1\";\n    .port = \"8282\";\n}\n\nacl purge {\n    \"127.0.0.1\";\n}\n\nsub vcl_recv {\n    if (req.method == \"PURGE\") {\n        if (client.ip !~ purge) {\n            return (synth(405, \"Method not allowed\"));\n        }\n        if (!req.http.X-Magento-Tags-Pattern) {\n            return (synth(400, \"X-Magento-Tags-Pattern header required\"));\n        }\n        ban(\"obj.http.X-Magento-Tags ~ \" + req.http.X-Magento-Tags-Pattern);\n        return (synth(200, \"Purged\"));\n    }\n\n```\nif (req.method != \"GET\" &&\n    req.method != \"HEAD\" &&\n    req.method != \"PUT\" &&\n    req.method != \"POST\" &&\n    req.method != \"TRACE\" &&\n    req.method != \"OPTIONS\" &&\n    req.method != \"DELETE\") {\n      /* Non-RFC2616 or CONNECT which is weird. */\n      return (pipe);\n}\n\n# We only deal with GET and HEAD by default\nif (req.method != \"GET\" && req.method != \"HEAD\") {\n    return (pass);\n}\n\n# Bypass shopping cart and checkout requests\nif (req.url ~ \"/checkout\") {\n    return (pass);\n}\n\n# normalize url in case of leading HTTP scheme and domain\nset req.url = regsub(req.url, \"^http[s]?://\", \"\");\n\n# collect all cookies\nstd.collect(req.http.Cookie);\n\n# static files are always cacheable. remove SSL flag and cookie\n    if (req.url ~ \"^/(pub/)?(media|static)/.*\\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$\") {\n    unset req.http.Https;\n    unset req.http.Cookie;\n}\n\nreturn (hash);\n```\n\n}\n\nsub vcl_hash {\n    if (req.http.cookie ~ \"X-Magento-Vary=\") {\n        hash_data(regsub(req.http.cookie, \"^._?X-Magento-Vary=([^;]+);_.*$\", \"\\1\"));\n    }\n\n}\n\nsub vcl_backend_response {\n    if (beresp.http.content-type ~ \"text\") {\n        set beresp.do_esi = true;\n    }\n\n```\nif (bereq.url ~ \"\\.js$\" || beresp.http.content-type ~ \"text\") {\n    set beresp.do_gzip = true;\n}\n\n# cache only successfully responses and 404s\nif (beresp.status != 200 && beresp.status != 404) {\n    set beresp.ttl = 0s;\n    set beresp.uncacheable = true;\n    return (deliver);\n} elsif (beresp.http.Cache-Control ~ \"private\") {\n    set beresp.uncacheable = true;\n    set beresp.ttl = 86400s;\n    return (deliver);\n}\n\nif (beresp.http.X-Magento-Debug) {\n    set beresp.http.X-Magento-Cache-Control = beresp.http.Cache-Control;\n}\n\n# validate if we need to cache it and prevent from setting cookie\n# images, css and js are cacheable by default so we have to remove cookie also\nif (beresp.ttl > 0s && (bereq.method == \"GET\" || bereq.method == \"HEAD\")) {\n    unset beresp.http.set-cookie;\n    if (bereq.url !~ \"\\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)(\\?|$)\") {\n        set beresp.http.Pragma = \"no-cache\";\n        set beresp.http.Expires = \"-1\";\n        set beresp.http.Cache-Control = \"no-store, no-cache, must-revalidate, max-age=0\";\n        set beresp.grace = 1m;\n    }\n}\nreturn (deliver);\n```\n\n}\n\nsub vcl_deliver {\n    if (resp.http.X-Magento-Debug) {\n        if (resp.http.x-varnish ~ \" \") {\n            set resp.http.X-Magento-Cache-Debug = \"HIT\";\n        } else {\n            set resp.http.X-Magento-Cache-Debug = \"MISS\";\n        }\n    } else {\n        unset resp.http.Age;\n    }\n\n```\nunset resp.http.X-Magento-Debug;\nunset resp.http.X-Magento-Tags;\nunset resp.http.X-Powered-By;\nunset resp.http.Server;\nunset resp.http.X-Varnish;\nunset resp.http.Via;\nunset resp.http.Link;\n```\n\n}\n\n<!--- (This may be platform independent comment) -->\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/339298436","html_url":"https://github.com/magento/magento2/issues/6289#issuecomment-339298436","issue_url":"https://api.github.com/repos/magento/magento2/issues/6289","id":339298436,"user":{"login":"magento-engcom-team","id":31669971,"avatar_url":"https://avatars1.githubusercontent.com/u/31669971?v=4","gravatar_id":"","url":"https://api.github.com/users/magento-engcom-team","html_url":"https://github.com/magento-engcom-team","followers_url":"https://api.github.com/users/magento-engcom-team/followers","following_url":"https://api.github.com/users/magento-engcom-team/following{/other_user}","gists_url":"https://api.github.com/users/magento-engcom-team/gists{/gist_id}","starred_url":"https://api.github.com/users/magento-engcom-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento-engcom-team/subscriptions","organizations_url":"https://api.github.com/users/magento-engcom-team/orgs","repos_url":"https://api.github.com/users/magento-engcom-team/repos","events_url":"https://api.github.com/users/magento-engcom-team/events{/privacy}","received_events_url":"https://api.github.com/users/magento-engcom-team/received_events","type":"User","site_admin":false},"created_at":"2017-10-25T11:23:57Z","updated_at":"2017-10-25T11:23:57Z","author_association":"NONE","body":"@LS-Supriya, thank you for your report.\nWe were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.\nWe tested the issue on 2.3.0-dev, 2.2.0, 2.1.9"}}
{"actor":{"display_login":"magento-engcom-team"}}