I'm triyng to setup nginx so every vhost can access phpmyadmin like so
example.com/phpmyadmin
I tried using this configuration but no luck
this is my default file
server {
#return 404;
location /phpmyadmin {
root /usr/share/nginx/phpmyadmin/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/nginx/phpmyadmin/;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/nginx/phpmyadmin/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
}
thanks.