Repository navigation
Closed
Labels
Description
I try to run phpMyAdmin on Kubernetes with the following config:
apiVersion: apps/v1
kind: Deployment
metadata:
name: phpmyadmin
labels:
app: phpmyadmin
spec:
replicas: 1
selector:
matchLabels:
app: phpmyadmin
template:
metadata:
labels:
app: phpmyadmin
spec:
containers:
- name: phpmyadmin
image: phpmyadmin/phpmyadmin:latest
env:
- name: TZ
value: Europe/Zurich
- name: PMA_HOST
value: ***
- name: PMA_USER
value: ***
- name: PMA_PASSWORD
value: ***
- name: PMA_ABSOLUTE_URI
value: http://***.media.int/phpmyadmin/
ports:
- containerPort: 80
name: http
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 200m
memory: 200Mi
---
apiVersion: v1
kind: Service
metadata:
name: phpmyadmin
labels:
app: phpmyadmin
spec:
type: ClusterIP
ports:
- name: http
port: 80
targetPort: http
selector:
app: phpmyadmin
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: phpmyadmin
annotations:
nginx.ingress.kubernetes.io/proxy-buffering: "on"
nginx.ingress.kubernetes.io/proxy-buffer-size: "128k"
nginx.ingress.kubernetes.io/proxy-buffers-number: "4"
nginx.ingress.kubernetes.io/whitelist-source-range: ***
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
rules:
- host: ***.media.int
http:
paths:
- path: /phpmyadmin(/|$)(.*)
backend:
serviceName: phpmyadmin
servicePort: 80Even I've set the PMA_ABSOLUTE_URI environment variable phpMyAdmin is greatly ignoring it:

Activity
williamdes commentedon Jul 22, 2020
Hi @dannyyy
To force a value could you try ENV
PMA_USER_CONFIG_BASE64with the value ofecho -e "<?php \n$cfg['PmaAbsoluteUri'] = 'http://***.media.int/phpmyadmin/';\n" | base64nolandg commentedon Oct 23, 2020
Has anyone solved this?
PMA_ABSOLUTE_URIseems to have no effect. My phpmyadmin instance running behind Traefik keeps trying to load resources from the root url/and nothttps://mydomain.com/phpmyadminso everything 404s.nolandg commentedon Oct 23, 2020
OMFG trailing slash.
From
PMA_ABSOLUTE_URI=https://mydomain.com/phpmyadmintoPMA_ABSOLUTE_URI=https://mydomain.com/phpmyadmin/solved all my worldly problems.williamdes commentedon Oct 23, 2020
Could you post your working configuration?
nolandg commentedon Oct 23, 2020
docker-compose.yamlfor one Wordpress + MySql + PhpMyAdmin instance:And the reverse proxy
docker-compose.yamlincluding the Traefik admin dashboard accessible at a port secured by an external firewall. This container must be spun up first because it provides the network definition.nolandg commentedon Oct 23, 2020
let me know if I forgot to redact something there :-D
williamdes commentedon Oct 23, 2020
Everything seems fine, thank you
mamedshahmaliyev commentedon Nov 26, 2025