We help IT Professionals succeed at work.

Secure phpmyadmin/phpmyadmin Docker container connection

I have a Debian 10 server with a phpmyadmin/phpmyadmin Docker container on it which points to a Amazon RDS database. Currently whenever I log in to the phpmyadmin website it is using port 80 and it is unsecure. Is there a way when I pull the phpmyadmin/phpmyadmin to have it use a secure connection from my computer to my phymyadmin website? I'm sure I can change the port to 8080:443 but won't I need a certificate?
Thanks

Current command to pull:
sudo docker run --name phpmyadminone -d -e PMA_HOST=myrdsdatabaseserverxxxxxxxxxxxx.com -p 8080:80 phpmyadmin/phpmyadmin

Open in new window


DockerHub Link phpmyadmin/phpmyadmin
Comment
Watch Question

Fractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
Yes.

1) Remove the config file which allows phpmyadmin to be accessed via HTTP.

2) Add the exact same config line inside a <VirtualHost> container of a working HTTPS host or domain.

3) At this point you'll use https://example.com/phpmyadmin for phpmyadmin HTTPS access.
ITSysTechSenior Systems Administrator

Author

Commented:
Thanks for your quick response David.
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
You're welcome!