Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] Missing nginx and apache reverse proxy examples #440

Open
ag-gaphp opened this issue Jul 27, 2024 · 1 comment
Open

[Documentation] Missing nginx and apache reverse proxy examples #440

ag-gaphp opened this issue Jul 27, 2024 · 1 comment

Comments

@ag-gaphp
Copy link

I see a lot of different discussions, and I am confused at what configurations are the right ones for using the latest image behind nginx and/or apache at a subdirectory.

I've seen several different versions of rewrite regex, varying uses of PMA_ABSOLUTE_URI, and different ways of establishing the location block in nginx. Unfortunately, nothing is in the docs to help reign in all the differing information I see in these issues. I don't even know when I should populate the absolute URI and when not to, there are some bugs that say it should be specified and others that started working when the left it blank. My pma instance always tries to load scripts from the root URL instead of the location I have set in nginx.

All of these have differing ideas of what does and doesn't work:

I am just wondering, what is the official suggestion from the pma docker devs on how the nginx proxy config should look like? Haproxy and traefik examples exist in the docs, but nothing for apache or nginx. I feel like I am just running around in circles and there are too many differing bugs posted to make sense of in a coherent manner.

It seems like there is some special combination of using rewrite inside the location block (what's the regex supposed to be?), how to specify the location block in the first place, and using the PMA_ABSOLUTE_URI variable.

This isn't really a request for troubleshooting help as I am still trying all of the things, but more for transparency in what is expected to work from the maintainers' perspectives. We currently don't have this information documented.

@ag-gaphp ag-gaphp changed the title [Documentation] No nginx or apache reverse proxy examples [Documentation] Missing nginx and apache reverse proxy examples Jul 27, 2024
@ag-gaphp
Copy link
Author

ag-gaphp commented Jul 27, 2024

It appears that the bare minimum required for nginx is:

location /pma/ {
    proxy_pass   http://pma_container;
    rewrite      ^/pma(/.*)$ $1 break;
}

IMPORTANT NOTES:

  • The location block must have a trailing /
  • The proxy_pass directive must NOT have a trailing /
  • PMA_ABSOLUTE_URI must be set, and also must have a trailing /
  • The rewrite directive is required, and the regex example in the last comment of Nginx reverse proxy to phpmyadmin is not working #210 appears to work for this setup
  • There may be other directive requirements for use with https

If I deviate from any of these notes, the configuration fails to load the login page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant