CentOS7配置phpmyadmin用户名认证auth_basic
接此文 CentOS7配置nginx php php-fpm mariadb phpmyadmin(yum安装) http://blog.youkuaiyun.com/shile/article/details/73535295
一. 安装httpd-tools
#yum -y install httpd-tools
二. 生成密码文件
#htpasswd -b -c /etc/nginx/htpasswd.file 'user' 'passwd'
三. 配置nginx
#vi /etc/nginx/conf.d/default.conf
在server块后面加入如下内容:
location /pma/ {
auth_basic "phpmyadmin need http user and password";
auth_basic_user_file /etc/nginx/htpasswd.file;
index index.php;
root /usr/share/nginx/html;
location ~ ^/pma/(.