If we are running PHPMyAdmin behind nginx reverse proxy with SSL, PHPMyAdmin could return errors regarding cookie transfer.
Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin
PHPMyAdmin by default is using cookie type of authorisation to get your login/password login security more hardened. Cookie type of authorisation represented in /etc/phpmyadmin/config.inc.php
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
To fix it, we should use these settings in the nginx reverse proxy configuration. These settings allow nginx to transfer security cookies to the PHPMyAdmin backend server
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_cookie_path / "/; Secure; HttpOnly; SameSite=Lax";