Nginx | fastcgi_cache_key $http_cookie for Joomla

c0nw0nk nginx-forum at
Tue Aug 16 13:50:28 UTC 2016

So i found the following for Drupal,220510,220563#msg-220563

http {
map $http_cookie $session_id {
default '';
~SESS(?<session_guid>[[:alnum:]]+) $session_guid;

server {
location ~ \.php$ {
fastcgi_cache_key $session_cookie$request_method$scheme$host$request_uri;

And want to implement it for Joomla but Joomla's cookies regex do not
contain "SESS", Wanted some help to modify this for a Joomla environment so
the pages cached and served when registered users are logged in they will
only receive their own pages because of the cookie matching with the key.

Example Joomla based site that session cookie format can be seen.

Posted at Nginx Forum:,268992,268992#msg-268992

More information about the nginx mailing list