LoginSignup
7
6

More than 3 years have passed since last update.

macOS+XAMPP+phpMyAdminでアクセスできなかった時の解決法

Posted at

概要

macOS で、XAMPP をインストールし、phpMyAdmin を使用する時に、「アクセス禁止!」が表示された時の対処法。

環境

MacOS X Mojave, XAMPP 7.3.6, PHP 7.3.6, Apache 2.4.34, MariaDB 10.4.6

方法1

  1. XAMPP の「Volumes」タブで、「/opt/lampp」:「mount」を選択
  2. /opt/lampp/etc/extra/httpd-xampp.confを開く。
/opt/lampp/etc/extra/httpd-xampp.conf
# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Require local
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

20行目付近、Require localRequire all grantedに変更する。

/opt/lampp/etc/extra/httpd-xampp.conf
# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Require all granted
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

Apache を再起動すればアクセス出来る。

方法2

XAMPP の Network 設定を開く。
スクリーンショット 2019-06-28 10.04.27.png

localhost:8080 -> 80 (Over SSH)を選択し、Enable を選択。
これでhttp://localhost:8080/phpmyadmin/からアクセス出来るようになった。

感想

学校の実習で XAMPP を使用する際に phpMyAdmin にアクセスできなかったので解決策を調べました。これで問題なく授業が受けられそうです。

参考

macOS+XAMPP+phpMyAdminで「アクセス禁止!」が出る時の対策
MacのXAMPPでphpMyAdminにアクセス

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6