
1. First download and decompress phpmyadmin
After the download is complete, decompress:
unzip phpMyAdmin-4.1.12-all-languages.zip
Move to the corresponding directory location and change into an easily accessible name:
mv phpMyAdmin-4.1.12-all-languages /www/phpmyadmin
2. Then configure phpmyadmin
Copy a configuration file:
#cd /www/phpmyadmin #cp config.sample.inc.php config.inc.php
Configuration config.inc.php
#vi config.inc.php
Set a secret key for internal use (related to internal encryption, not directly related to page login)
$cfg['blowfish_secret'] = ‘www.tudaxia.com';
3. Configure the site under Nginx
vi /etc/nginx/conf.d/phpmyadmin.conf
server {
listen 8081;
server_name localhost;
access_log /var/log/nginx/phpmyadmin-access.log main;
location / {
root /www/phpmyadmin;
index index.php;
}
location ~ \.php$ {
root /www/phpmyadmin;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}4. Restart nginx
Configuration completed. Recommended related article tutorials: phpmyadmin tutorial The above is the detailed content of nginx server supports phpmyadmin configuration. For more information, please follow other related articles on the PHP Chinese website!#service nginx restart