Running Nginx and Apache for Node Js + Phpmyadmin

May 6, 2016 549 views
Apache Node.js Nginx MySQL

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 ?

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.
Have another answer? Share your knowledge.