Friday, June 23, 2017

How do I access phpMyAdmin on localhost with NginX




I have a laptop running Ubuntu 16.10 (Mate), which I use as a local server just for testing websites that I develop. I recently switched from Apache2 to NginX. I have successfully set up NginX so that all my PHP based sites are running, and I get the output of phpinfo(), so I have PHP working.



The instructions I've found for getting phpMyAdmin to work with NginX seemed pretty simple:




  1. sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html/

  2. sudo service nginx restart

  3. clear the browser cache

  4. Open phpMyAdmin in the browser at localhost/phpmyadmin




I did all those steps, but I get a 404 not found error. I've tried moving the symlink to phpMyAdmin to different places, such as /var/www, which is where my other websites are, but it hasn't helped. It seems no matter where I put phpMyAdmin, it won't open.



What is the correct way to set up phpMyAdmin so that I can open it on my local NginX server?



1.While installing phpmyadmin, select apache2 and install it, it copies necessary files.



2.Nginx use /var/www/html/ for default web server root. so use ln -s /usr/share/phpmyadmin /var/www/html.



3.If you changed web server root, istead of /var/www/html, use your path and make sure you set the right permissions.




4.open your browser and open localhost/phpmyadmin, you should open phpMyAdmin.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...