我如何限制只从特定IP地址访问phpMyAdmin? 我想要phpMyAdmin,这是托pipe在数据中心,只能从我的办公室的IP范围访问。 LAMP和phpMyAdmin在Debian 6 linux服务器上运行。
在vhostconfiguration或相应的.htaccess文件中添加/编辑以下内容:
.htaccess
<Location /path/to/phpmyadmin> Order allow,deny Allow from 1.2.3.4 Allow from 5.4.3.2 Deny from all </Location>
根据需要将pathreplace为文件夹和IP。