MAMPエラー対処「There is a problem with the server ports.」

no image

Mac OS X Yosemite に MAMPのバージョン「3.0.7.3」をインストールし、Apache と MySQL のポート番号を 80 と 3306 に設定しようとすると……。

mamp there is a problem with the server ports 01

There is a problem with the server ports. Each server must be assigned a unique port. Please check your configuration.
(サーバーのポートに問題があります。ポートはユニークじゃないとダメ!設定を確認してね!

というエラーが表示されるので、ここではこのエラーの対処方法を紹介します。

エラーの対処方法

参考サイトによると、Apacheの設定ファイル「httpd.conf」を直接編集し、ポート番号を変更すれば、OKとのことです。

それでは実際に設定してみましょう。

mamp there is a problem with the server ports 02
まずは、MySQLのポートのみを「3306」と手動入力し、「OK」をクリックします。

mamp there is a problem with the server ports 03
次にFinderを起動し、「アプリケーション」フォルダの「MAMP」ヘアクセスし、

mamp there is a problem with the server ports 04
Apache の設定ファイル「httpd.conf」ファイルを編集します(念のためバックアップを取得しておきましょう)。

「httpd.conf」ファイルのフルパスはこちら。

/Applications/MAMP/conf/apache/httpd.conf

48行目と182行目にある「8888」を「80」に変更します。

設定ファイル「httpd.conf」とバックアップ・ファイル「httpd.conf.org」のdiff(差分)は以下のようになります。

$ diff httpd.conf httpd.conf.org 
48c48
 Listen 8888
182c182
 ServerName localhost:8888

設定を変更したら、Apacheのポートが「80」番ポートに変更されているかを確認します。

mamp there is a problem with the server ports 05
MAMAの「オープンWebStart」をクリックします。

mamp there is a problem with the server ports 06
すると、ブラウザーが起動するのでURLを確認します。

http://localhost/MAMP/?language=Japanese

このようにポート番号が表示されていなければ、適切に変更されています。

MAMP の人気記事