Is this a Docker or Nginx problem?
Briefly

The article discusses an Nginx configuration issue impacting PhpMyAdmin access in a Docker environment. The user faces a 502 Bad Gateway error after logging in due to Nginx not recognizing the /phpmyadmin/ subpath, which leads to incorrect URL generation. The author recommends modifying the Nginx configuration to include specific headers and settings, such as the X-Script-Name header to notify PhpMyAdmin of its subpath, thereby resolving the issue and ensuring proper session management and functionality in accessing PhpMyAdmin.
The redirection issue in PhpMyAdmin is due to Nginx not correctly handling the /phpmyadmin/ subpath, leading to a 502 Bad Gateway error.
To resolve the 502 error in PhpMyAdmin, modify the Nginx configuration to include the X-Script-Name header and correctly manage subpath handling.
Using the modified Nginx configuration ensures that PhpMyAdmin is aware of its subpath, preventing incorrect URL generation and maintaining proper session management.
The suggested Nginx settings will rewrite cookie paths and handle HTTP versioning issues to support the correct functioning of PhpMyAdmin.
Read at www.sitepoint.com
[
|
]