I love PhpMyAdmin because it was straightforward to set up for any app and fix the table database or troubleshoot. So, we will set up PhpMyAdmin with nginx SSL secure for our HTTPS. We would rather not expose this on HTTP due to grabber username and password exploits…
Make sure you do this first! Before starting build this because this tutorial is always requirement to make app prevent hack and expose our port to the public… we don’t want that to happen. We only want open 80 and 443 that it.
How to set up Portainer with nginx Proxy Manager — Applegate’s IT and Network (x4-applegate.com)
After you complete Portainer and nginx, then we are good to go to build this app with nginx and PhpMyAdmin.
Open Portainer → Stacks→ create stacks
version: '3' services: pma: networks: - nginx - mariadb image: phpmyadmin/phpmyadmin container_name: pma environment: PMA_ARBITRARY: 1 restart: always #ports: # - 8081:80 networks: nginx: external: true mariadb: external: true
I added hashtag comments on ports and Port number because we don’t need these, and we just will use nginx network on this app. So, nginx proxy can communicate with PhpMyAdmin instead of port or public. It more secure to build our app before publishing to the public. They can inject your sites with HTTP or any insecure port.
Then deploy the stacks and now your PhpMyAdmin is online but will not show up on site because you haven’t set up nginx Proxy details. So that our next step.
Open nginx proxy manager your site. My will be nginxadmin.richardapplegate.io.
Then you will need to log in to your admin account. Then add proxy host, then fill this detail.



Now you may open your site with a domain without port. My will be phpmyadmin.richardapplegate.io. and working!

Username: your primary account for all database control. Mine is root.
Password: you create the password and the password should on your docker-compose. You won’t be possible to log in my PhpMyAdmin because 3 times incorrect information, then you will be banned. You won’t access from my server or see my sites anymore for 1 week.
Then you are in database MariaDB system

Leave a Reply