Skip to main content

Cookies Not Enabled Login Error

This error is often caused by a custom login URL being cache by either Redis or Cloudflare. Exclude the custom login URL from both caches to resolve.

Create Cache Exclusion:

Single Site:

nano /var/www/{{site.url}}/nginx/custom-skip-redis-cache-context.conf
if ($request_uri ~* "(/kickstart/)") {
set $skip_cache 1;
set $skip_reason "${skip_reason}-request_uri";
}

Server Wide:

Create

nano /etc/nginx/extra.d/custom-login-skip-redis-cache-context.conf

Exclude

if ($request_uri ~* "(/kickstart/)") {
set $skip_cache 1;
set $skip_reason "${skip_reason}-request_uri";
}

Copy

cp /etc/nginx/extra.d/custom-login-skip-redis-cache-context.conf /etc/nginx/extra.d/_custom/custom-login-skip-redis-cache-context.conf

** Check and Reload Nginx **

Check the Nginx configuration file with:

nginx -t
gp ngx reload