hgv-deploy-full icon indicating copy to clipboard operation
hgv-deploy-full copied to clipboard

Varnish Problem: Can't customize Themes, including change themes or change static pages

Open matthew6688 opened this issue 8 years ago • 4 comments

I find a new problems:

After the installation, you can't customized the wordpress theme, it will keep log you out, session expired.

When i stoped Varnish, Then it is working propely.

matthew6688 avatar Jun 17 '16 08:06 matthew6688

Anyone have the same problem? or solutions?

matthew6688 avatar Jun 17 '16 08:06 matthew6688

In my experience with this stack, you are experiencing an issue with Varnish+NGINX and their handling of the WP admin cookie. A quick fix would be to disable Varnish:

  • Change /etc/nginx/sites-available/yourdomain.com listening port to 80
  • Disable the 3 varnish services through sysv-rc-conf
  • Either restart the web server or simply stop the Varnish services and restart the NGINX service

luenix avatar Jun 20 '16 20:06 luenix

this might be an issue on varnish caching and you can just remove varnish to fix it.. but if you want to still use varnish, just disable varnish cache on the wp-admin folder..

if (req.url ~ "^/wp-admin") { return (pass); }

matthewsuan avatar Jul 25 '16 18:07 matthewsuan

@matthewsuan Thank you for your reply.

But when i checked the default.vcl, they have the code below:

# Don't cache admin if (req.url ~ "((wp-(login|admin|comments-post.php|cron.php))|login|timthumb|wrdp_files)" || req.url ~ "preview=true" || req.url ~ "xmlrpc.php") { return (pass); } else { if ( !(req.http.cookie ~ "wpoven-no-cache") ) { unset req.http.cookie; } } }

I think it already included to exclude the wp-admin, right?

The problems still exist

matthew6688 avatar Aug 26 '16 04:08 matthew6688