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:
sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html/
sudo service nginx restart
- clear the browser cache
- 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