2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MAMPでサーバー起動時にエラー(here is a problem with the server ports. Each server must be assigned a unique port. Please check your configuration.)が表示され、うまく起動できない時の対処法。

Last updated at Posted at 2014-11-09

WordPressでサイトを制作しようと思い、
以前使用していたMAMPをアンインストールして最新版のMAMPをインストール&初期設定しようとおもったら。。。

設定→ポート→[WebとMySQLのポートを80と3306に設定]しようとおもうと
以下のようなエラーが表示されました。

here is a problem with the server ports. Each server must be assigned a unique port. Please check your configuration.

ポートが競合しているよ!ということだったので、portsscanを使ってしらべてみたけど。。。なんか違う原因みたい。

格闘すること2時間。ついに!?

海外のフォーラムに、こんな記事が見つかったということで、じっせん。
http://stackoverflow.com/questions/26512279/error-changing-the-port...

httpd.confの48行目と182行目(エディタによって行数に違いがでます。)を以下のように変更しろと。
48行目
=> Listen 80
179行目 => ServerName localhost:80

※httpd.confは以下にあります。(ただし通常インストールの場合)
/Applications/MAMP/conf/apache/httpd.conf

結果、だめー><

さらに格闘すること1時間。こんどこそ解決!
(ちなみに、上記の作業は無駄ではないです。設定はそのままで以下を追加設定してください。)

ApacheとNginxのポートが別になるように設定してください。

MAMPのデフォルト値が以下です。
Apache:8888
Nginx:7888
MySQL8889

↓以下に設定!

Apache:80
Nginx:7888
MySQL:3306

Webサーバーとして使う方を80に設定して、使わない方をMANPのデフォルトを
使うように設定する。らしいです。

私はサーバー周りの知識が乏しいので初めてしったのですが、MAMPではApacheとNginxを両方起動することが出来ないらしいです。

以上です。

2
3
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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?