phpMyAdmin
Scoop is necessary
This guide use scoop to install this binary, if you don't have it, check this guide
Download
Download phpMyAdmin last version and extract it to html folder in nginx. Rename it phpmyadmin and check in the below example if you have same file hierarchy. Full path: C:\Users\username\scoop\apps\nginx\current\html
📦C:/Users/username/scoop/apps/nginx/current
┣ 📂conf
┣ 📂conf.original
┣ 📂contrib
┣ 📂docs
┣ 📂html
┃ ┣ 📂phpmyadmin
┃ ┃ ┣ 📂doc
┃ ┃ ┣ 📂...
┃ ┣ 📜50x.html
┃ ┣ 📜index.html
┃ ┗ 📜info.php
┣ 📂html.original
┣ 📂logs
┣ 📂logs.original
┣ 📂temp
┗ 📜nginx.exeConfigure nginx.conf
::alert{type="warning"} PHP Service
Here, I suppose you have installed
php-ntswith scoop and create php8.2 Service with NSSM.
If you want to use another version of PHP, it's not a problem, just check port 9082 to change it if you use anoter. ::
You will need to add some infos to nginx.conf (you will find it where scoop install NGINX C:\Users\username\scoop\apps\nginx\current\conf\nginx.conf) for phpMyAdmin.
For default server (server_name localhost;) block
index.phptolocation /blocklocation ~ \.php$block (see example for complete block)
::callout{type="info"} #summary NGINX configuration example #content
# ...
events {
# ...
}
http {
# ...
server {
listen 80;
server_name localhost;
location / {
# ...
# 'index.php' for phpmyadmin
index index.php index.html index.htm;
}
# ...
# 'location' block for phpmyadmin (with PHP 8.2)
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9082;
include fastcgi.conf;
}
}
# ...
}::
You have update nginx.conf, so you need to restart NGINX Service:
sudo nssm restart nginxIn any browser, at http://localhost/phpmyadmin, you have to see phpMyAdmin welcome page
Configure phpMyAdmin (optional)
cp C:/Users/$env:UserName/scoop/apps/nginx/current/html/phpmyadmin/config.sample.inc.php C:/Users/$env:UserName/scoop/apps/nginx/current/html/phpmyadmin/config.inc.phpIn C:/Users/$env:UserName/scoop/apps/nginx/current/html/phpmyadmin
// blowfish_secret is just a token for phpMyAdmin
$cfg['blowfish_secret'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
// Add this line to stay connected during one week
$cfg['LoginCookieValidity'] = 604800;To generate blowfish_secret, you can use pwgen with WSL.
sudo apt install pwgen ; pwgen -s 32 1If you update LoginCookieValidity, you need to update session.gc_maxlifetime in current php.ini
// line ~1400
session.gc_maxlifetime = 604800