既存のサーバにphpMyAdminを入れる機会がありました🐱
条件
- 既存のApacheが動いている状態から
- PHP5.6
# cd /var/www/html # wget https://files.phpmyadmin.net/phpMyAdmin/4.7.7/phpMyAdmin-4.7.7-all-languages.zip # unzip phpMyAdmin-4.7.7-all-languages.zip # rm -f phpMyAdmin-4.7.7-all-languages.zip # mv phpMyAdmin-4.7.7-all-languages 4649phpMyAdmin
# vi /etc/apache2/conf-available/phpmyadmin.conf
Alias /4649phpMyAdmin  "/var/www/html/4649phpMyAdmin"
  <Location /brave55phpMyAdmin>
    Require all denied
    Require ip xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy
  </Location>
xxx.xxx.xxx.xxxとyyy.yyy.yyy.yyyのIPのみアクセス許可
反映
# a2enconf phpmyadmin.conf # service apache2 restart
http://IPアドレス/4649phpMyAdmin









