When accessing phpMyAdmin via an Apache reverse proxy, cookie login does not work. ΒΆ

To be able to use cookie auth Apache must know that it has to rewrite the set-cookie headers. Example from the Apache 2.2 documentation:

ProxyPass /mirror/foo/ http://backend.example.com/ ProxyPassReverse /mirror/foo/ http://backend.example.com/ ProxyPassReverseCookieDomain backend.example.com public.example.com ProxyPassReverseCookiePath / /mirror/foo/ 

Note: if the backend url looks like http://server/~user/phpmyadmin, the tilde (~) must be url encoded as %7E in the ProxyPassReverse* lines. This is not specific to phpmyadmin, it's just the behavior of Apache.

ProxyPass /mirror/foo/ http://backend.example.com/~user/phpmyadmin ProxyPassReverse /mirror/foo/ http://backend.example.com/%7Euser/phpmyadmin ProxyPassReverseCookiePath /%7Euser/phpmyadmin /mirror/foo 

See also

<https://httpd.apache.org/docs/2.2/mod/mod_proxy.html>, $cfg['PmaAbsoluteUri']