# Sample setting for Adminer: http://adminer.org/ # ----------------------------------------- # How to get it working: # # mkdir PH_HTTPD_SERVERROOT/adminer # cd PH_HTTPD_SERVERROOT/adminer # wget http://www.adminer.org/latest.php # chmod +x latest.php # # Warning: for security concern, it's recommended to change the URL '/adminer' # to another random string to avoid login attempts from bad guys. # for example, change the url to '^/HIoWCwogSHukIbGL'. # # ----------------------------------------- # If you cannot login to MySQL server as root user: # # New MySQL or MariaDB support plugin authentication, by default, the root # account has setting `user.plugin=unix_socket` (in `mysql` database). The # `auth_socket` authentication plugin authenticates clients that connect from # the local host through the Unix socket file, this prevents access via network # connection, including Adminer. To make it working, please disable this # authentication plugin with sql commands below: # # sql> USE mysql; # sql> UPDATE user SET plugin='' WHERE User='root'; # # Refer to MySQL document for more details: # https://dev.mysql.com/doc/refman/5.7/en/socket-authentication-plugin.html location ~ ^/adminer$ { include PH_NGINX_CONF_TMPL_DIR/hsts.tmpl; include PH_NGINX_CONF_TMPL_DIR/fastcgi_php.tmpl; fastcgi_param SCRIPT_FILENAME PH_HTTPD_SERVERROOT/adminer/latest.php; # Access control #allow 127.0.0.1; #allow 192.168.1.10; #allow 192.168.1.0/24; #deny all; } location ~ ^/adminer.css$ { alias PH_HTTPD_SERVERROOT/adminer/adminer.css; }