need install:
- php-fpm
- nginx
sudo apt install phpmyadmin
create into /etc/nginx/snippets
the file phpmyadmin.conf
add in file:
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass unix:/run/php/php8.2-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/;
}
}
! attemption to your php-fpm.sock path
in nginx site file config add into server sector the line:
include snippets/phpmyadmin.conf;