先參考別人的
~~
If you are running the Virtual Appliance in a secure environment, you can enable it by editing the "installdir/apps/phpmyadmin/conf/phpmyadmin.conf" file and replace "Allow from 127.0.0.1" with "Allow from all":
Alias /phpmyadmin "/installdir/apps/phpmyadmin/htdocs"
<Directory "/installdir/apps/phpmyadmin/htdocs">
AuthType Basic
AuthName phpMyAdmin
AuthUserFile "/installdir/apache2/users"
Require valid-user
Order allow,deny
Allow from all
Satisfy all
ErrorDocument 403 "For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname"
</Directory>
Then you should restart Apache to load the changes:
$ cd installdir
$ ./ctlscript.sh restart apache
Then you can access at the same URL with "/phpmyadmin" or "/phppgadmin", for example http://YOUR_IP/phpmyadmin>
~~
資料來源