502 Bad Gateway on install phpmyadmin with nginx

Posted January 19, 2018 15.7k views
NginxMySQLUbuntu 16.04

I’ve install one-click nodejs ubuntu 16.04 droplet and config the nginx. I try install phpmyadmin and get a 502 code in /phpmyadmin url. How to make this work?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

As phpmyadmin is a PHP application you will need to ensure PHP is installed. As well you will need to instruct NGINX to use php for PMA.

Here is a start with it.

However since you’re using NodeJS you may want to look at other solutions

by Brennen Bearnes
While many users require access to a database management system like MySQL, not all users feel comfortable interacting with the MySQL prompt on a daily basis. In this guide, we'll discuss how to install and secure phpMyAdmin, a web management interface for MySQL, on an Ubuntu 16.04 server.

I can run php and nodejs in the same droplet?

  • Correct.
    You can run any number of applications on the same server (droplet).

    I am not quite sure about the one click install(s) as I tend to go for the distribution server(s) (droplets) - i.e. Ubuntu:16.04 or Debian:9 - and then configure and install everything as needed.

    I suspect that if you can ssh into the one-click droplet you should be able to add additional software.