Sub-URI support based on config option PMA_SUB_URI_BASE#353
Sub-URI support based on config option PMA_SUB_URI_BASE#353fishermans wants to merge 2 commits intophpmyadmin:masterfrom
Conversation
|
Hi @fishermans @J0WI what do you think about this PR? |
Hi @williamdes, |
|
Maybe it is also possible to support sub-URI in general in PMA, for Docker and for native installations. If you do not have a wildcard certificate for your domain and working at a company where you have to ask other people to help you... sub-URI is very welcome. Something like https://www.php.net/manual/en/function.symlink.php should also work. But I am not an export in PHP as you know what I mean. The ENTRYPOINT "hack" was simple to implement and is easy to maintain. |
| * ``PMA_PORTS`` - define comma separated list of ports of the MySQL servers | ||
| * ``PMA_USER`` and ``PMA_PASSWORD`` - define username and password to use only with the `config` authentication method | ||
| * ``PMA_ABSOLUTE_URI`` - the full URL to phpMyAdmin. Sometimes needed when used in a reverse-proxy configuration. Don't set this unless needed. See [documentation](https://docs.phpmyadmin.net/en/latest/config.html#cfg_PmaAbsoluteUri). | ||
| * ``PMA_SUB_URI_BASE`` - the URL suffix to phpMyAdmin when running on sub-URI like `your.domain.local/pma`. Syntax: `/<sub-uri>`. |
There was a problem hiding this comment.
For me this can not be called PMA_SUB_URI_BASE starting with PMA_ means it is a phpMyAdmin config option
Maybe URL_BASE ?
| # See: https://stackoverflow.com/questions/42035947/how-to-change-the-access-url-of-official-phpmyadmin-docker-image-to-http-local/68643939#68643939 | ||
| if [ -n "${PMA_SUB_URI_BASE}" ]; then | ||
| echo "Using sub URI: ${PMA_SUB_URI_BASE}." | ||
| # Create symlink if link target does not already exit. |
There was a problem hiding this comment.
Create symlink if link target does not already exit.
To support docker container behind a reverse proxy I added a new optional config option to simply running PMA under a sub-URI based on approach posted on Stackoverflow: https://stackoverflow.com/questions/42035947/how-to-change-the-access-url-of-official-phpmyadmin-docker-image-to-http-local/68643939#68643939
It simply creates a symlink inside the www folder.