「エラー: Apache が予期せずシャットダウンしました」を解決するにはどうすればいいですか? 質問する

「エラー: Apache が予期せずシャットダウンしました」を解決するにはどうすればいいですか? 質問する

XAMPP を再インストールしたところ、XAMPP コントロール パネルで Apache サーバーを起動しようとすると、次のエラーが表示されます。

16:50:25  [Apache]     Status change detected: running
16:50:26  [Apache]     Status change detected: stopped
16:50:26  [Apache]     Error: Apache shutdown unexpectedly.
16:50:26  [Apache]     This may be due to a blocked port, missing dependencies,
16:50:26  [Apache]     improper privileges, a crash, or a shutdown by another method.
16:50:26  [Apache]     Press the Logs button to view error logs and check
16:50:26  [Apache]     the Windows Event Viewer for more clues
16:50:26  [Apache]     If you need more help, copy and post this
16:50:26  [Apache]     entire log window on the forums

これをどうやって解決すればいいでしょうか?

ベストアンサー1

私は開発者がファイアウォールの問題に直面している企業環境で働いているため、他の回答では問題は解決されませんでした。

このポートは Skype ではなく他の内部アプリケーションによって使用されるため、問題を解決するために以下の手順を実行しました。

ステップ 1 - XAMPP コントロール パネルの Apache で、[Config] ボタンをクリックし、Apache (httpd.conf) を選択します。

httpd.confファイル内に、次のような行が見つかりました:

Listen 80

80 を任意の番号/ポートに変更します。私のシナリオでは、ポート 8080 を使用しています。

Listen 8080

httpd.confファイルから、次のような別の行を見つけました。

ServerName localhost:80

80を8080に変更します。

ServerName localhost:8080

ステップ2 - XAMPPコントロールパネルのApacheの下で、もう一度Configボタンをクリックします。今回はApache(httpd-ssl.conf)を選択します。httpd -ssl.confファイル内で、次の行を見つけます。

Listen 443

443 を任意の番号/ポートに変更します。新しいポート番号として4433を使用します。

Listen 4433

httpd-ssl.confファイルから、次の行を見つけます。

<VirtualHost _default_:443>

ServerName localhost:443

443を4433に変更します。

<VirtualHost _default_:4433>

ServerName localhost:4433

変更を加えた後は、必ずhttpd.conf ファイルhttpd-ssl.confファイルを保存してください。その後、Apache サービスを再起動します。

おすすめ記事