Nginx Configuration for phpMyAdmin
On Debian 9 server with nginx, i installed phpmyadmin with
1 |
apt install phpmyadmin |
For some reason, ip-address/phpmyadmin did not work. On Ubuntu, it normally ask for for web server you have installed, then configure it during install.
I got this working by adding following code
1 2 3 4 5 6 7 |
location /phpmyadmin { root /usr/share/; location ~ ^/phpmyadmin/(.*\.php)$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.0-fpm.sock; } } |
Inside default nginx virtual host
1 |
/etc/nginx/sites-available/default |
Restart nginx with
1 |
service nginx restart |
Now you will be able to access phpmyadmin with url
1 |
http://SERVER-IP-ADDR/phpmyadmin |