Docker phpMyAdmin – Nginx reverse proxy

For a container with phpMyAdmin, you need to add a variable with an absolute path:

 

PMA_ABSOLUTE_URI: "https://artem.services/phpmyadmin"

 

The “location” block for Nginx (change the proxy path to yours):

    location  ~ \/phpmyadmin {
        rewrite ^/phpmyadmin(/.*)$ $1 break;
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_pass http://localhost:8080;
    }

 

Now phpMyAdmin will be available along the path:

https://artem.services/phpmyadmin/

Tagged: Tags

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments