Skip to content
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

Pages not cached and no login in woocommerce #20

Open
Q-efx opened this issue Jan 5, 2015 · 4 comments
Open

Pages not cached and no login in woocommerce #20

Q-efx opened this issue Jan 5, 2015 · 4 comments

Comments

@Q-efx
Copy link

Q-efx commented Jan 5, 2015

Hello,

it seems like I can´t get this varnish,vcl to work.

Neither does it cache anything nor can I login via "my-account" on woocommerce.

Site is: https://ediyemade.com if anyone want to take a look. I´m sadly not familar with varnish so no idea why it does not work ;( (using the default.vcl offereded here)

thanks guys.

Edit: Found a nice plugin, it is called smart varnish (very smart indeed lol) made config a whole lot easier. ) Cache is working now, but no login via "my-account" possible. While I can login via wp-login.

What do I miss?

@Oyabi
Copy link
Contributor

Oyabi commented Jan 5, 2015

Hi,
First I need some details ;)
What version of Nginx and what config file do you use?
If it's this file https://github.com/nicolargo/varnish-nginx-wordpress/blob/master/varnish/varnish4-wordpress you can normally log on my-account.
These lines made the job (try to adapt they if it's not exactly like yours):

# Do not cache the WooCommerce pages
### REMOVE IT IF YOU DO NOT USE WOOCOMMERCE ###
if (req.url ~ "/(cart|my-account|checkout|addons|/?add-to-cart=)") {
    return (pass);
}

If you use varnish 3 you maybe need some arrangement.
Regards.

@Q-efx
Copy link
Author

Q-efx commented Jan 6, 2015

Hi,

thanks for the reply. I am using: Pound (ssl termination) Varnish 4.0.2 (I think, newest debian version from there rebo) What I tried was to set: return(pass); on first line of the vcl_recv , didn´t changed. So I set: return (deliver); in the vcl_backend_response. And it worked. So I think there is the error. But I´m not sure what and how ;( I´m at work right now thou, I will write more when I´m home.

@JourneyToSilius
Copy link

Hi guys, I am also experiencing this problem. I would like to get a working
config for wordpress and Woocommerce. My site is using WPML ( the language
translator ) and I have a cookie for each language, wich is making it kinda
difficult to configure. I will be watching for the configs you post here
and try to add some feedback too.

2015-01-06 8:22 GMT+01:00 Q-efx notifications@github.com:

Hi,

thanks for the reply. I am using: Pound (ssl termination) Varnish 4.0.2 (I
think, newest debian version from there rebo) What I tried was to set:
return(pass); on first line of the vcl_recv , didn´t changed. So I set:
return (deliver); in the vcl_backend_response. And it worked. So I think
there is the error. But I´m not sure what and how ;( I´m at work right now
thou, I will write more when I´m home.


Reply to this email directly or view it on GitHub
#20 (comment)
.

@Q-efx
Copy link
Author

Q-efx commented Jan 6, 2015

Oki it is somewhere in the : vcl_backend_response section, just tried to put the return(deliver); in top and login worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants