hgv-deploy-full
hgv-deploy-full copied to clipboard
Varnish Problem: Can't customize Themes, including change themes or change static pages
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.
Anyone have the same problem? or solutions?
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
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 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