-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
varnish setup #153
Comments
Hi @IJOL, I will let @JeroenBoersma answers but if it can help, I succeeded in making Varnish locally working by modifying the generated VCL as below:
|
Many thanks Julien, after your comments and the #98 comments, we found the varnish related dev subcommands.. so its working now well.. But i wonder if your are working with latest magento v2.3.* and up , we were forced to make some adjustements to the way docroot it's set in the nginx web config, for magento2 host we needed to change docroot from $dev_customer/$dev_project and the usual htdocs later to htdocs/pub, and to be able to share this config with other hosts type ( namely magento1 ones ) made some ( to my view ) nasty fixes... you can have a look at them here [https://github.com/BITVAX/docker-compose-development/tree/trivax_100]... any help in better solving this issues?, or the way to solve them without nasty adjustments, as we may lack some knowledge of the way things are supposed to work with the repository master branch.. Thanks anyway your comment was really helpful |
Well, I never had to do this kind of changes in the nginx conf and I worked with Magento from 2.2 to 2.4. I guess I won't be able to help you much on this but; just in case, I remember that it is quite important to have your sources in a I mean, I'm used to have the following directory structure :
p.s : you are maybe already using such a structure and there is maybe no link between your issue and my comment, but that's all is coming in my mind at this moment. EDIT: I guess you should look at this file : https://github.com/JeroenBoersma/docker-compose-development/blob/master/build/dist/web/nginx/content/vars#L16 |
Hi.. Well given your directory structure i bet you were accessing with something like, http://m242.magento2.localhost or alike, and one of the automatic docroots is pub so far so good.. We were using dcd for magento1 previously with great success, and our dir struct was, as we did for m1 development workspace -> customer -> project (m2|m1) -> htdocs and issuing an url like http://customer.m2.magento2.localhost and thus all the tweaks we needed to do in nginx config.... Thanks.. more reading and less writing i should say in my case ;) |
Hi Jeroen:
We are trying to get varnish to work locally we got a functional vcl from magento2 itself, we changed the vcl to "backend" host and port 80, AFAIK this should work..put it in conf, but we got "backend fetch failed" from varnish, any idea why?
The text was updated successfully, but these errors were encountered: