Running Nginx and Apache for Node Js + Phpmyadmin

Posted May 6, 2016 8k views

Hi, I’ve just succeed to deploy a nodejs app with this great tuto :

Now the problem is that I bought my droplet with one click app option to have phpmyadmin pre-install, but to deploy my node js app I had to stop apache run to let nginx run and listening on port 80. Now I can’t access to phpmyadmin because my express routing does not take in charge the route : http://my_ip_adress/phpmyadmin.
Please anyone have an idea about how to aces phpmyadmin ?
Will my app be able to access to my tables even if apache server off ?
Can I just make apache run and listen on port (3000 for example) and Nginx running and listening on port 80 ?

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
1 answer

There are a number of ways you can approach this problem. One is to simply remove Apache all together. You can serve phpMyAdmin with Nginx as well. Check out:

If your setup is working fine as it is, and you just want to make Apache listen on port 3000, you can easily do that too. You’ll need to edit two files and change 80 to 3000

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 3000

<IfModule ssl_module>
        Listen 443

<IfModule mod_gnutls.c>
        Listen 443


<VirtualHost *:3000>
# [...]

Finally, restart Apache with sudo service apache2 restart Now your phpMyAdmin interface can be reached at: http://your.ip.addr:3000/phpmyadmin

by Justin Ellingwood
Administering relational databases from the command line can be a daunting proposition for many people. A project called phpMyAdmin aims to alleviate this issue by providing an easy to use web interface for MySQL. In this guide, we'll discuss how to install and secure phpMyAdmin on top of a LEMP (Linux, Nginx, MySQL, and PHP) stack on an Ubuntu 14.04 server.