LoginSignup
6
8

More than 5 years have passed since last update.

apache2を起動しようとすると、no listening sockets availableと言われる解決方法

Last updated at Posted at 2014-12-15

apache2を起動しようとしたら失敗しました。環境はUbuntuです。

apacheのバージョンは

Apacheのバージョンは2.4.7です。

apacheのバージョンを確認
Server version: Apache/2.4.7 (Ubuntu)
Server built:   Jul 22 2014 14:36:38

apacheの起動で失敗

apache起動をしようとすると失敗してしまいます。

apache2を起動で失敗
sudo /etc/init.d/apache2 start
 * Starting web server apache2                                                                           AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
 * 
 * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems

(´゚д゚`)アチャー80番ポートが使用されている場合にでるエラーのようです。

Listenしているポートを変更

デフォルトの80番ポートではダメなので変更します。

ports.confを編集
sudo vi /etc/apache2/ports.conf

Listen 3000

いまの環境では3000番ポートでアクセスするので、80番から3000番へから変更します。

apache2を起動

再度起動します。

apache2を起動
sudo /etc/init.d/apache2 start
 * Starting web server apache2

今度はうまくいきました(☝ ՞ਊ ՞)

6
8
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
6
8