こんにちは、雑記ラビリンスです。
久しぶりにXamppを起動させようとしたら
17:53:51 [Apache] Error: Apache shutdown unexpectedly.
17:53:51 [Apache] This may be due to a blocked port, missing dependencies,
17:53:51 [Apache] improper privileges, a crash, or a shutdown by another method.
17:53:51 [Apache] Press the Logs button to view error logs and check
17:53:51 [Apache] the Windows Event Viewer for more clues
17:53:51 [Apache] If you need more help, copy and post this
17:53:51 [Apache] entire log window on the forums
17:54:08 [Apache] Attempting to start Apache app...
というエラーが出てきました。
最初はhttpd.confに設定されているportが80、httpd-ssl.confに設定されているportが443になっているのかと思って確認しましたが特に問題はありませんでした。
確認:設定ファイルに記載するportに間違いはない。
続いて何らかの原因でXamppが壊れたのかと考えXamppをアンインストール後、再インストール。しかし結果は変わらず。
確認:Xamppの故障ではなさそう
続いて、セキュリティソフトが何らかの干渉をしたと考え、ファイヤーウォールを無効化して再トライ!しかし結果は変わらない。
確認:セキュリティソフトが原因ではなさそう
最後にたどり着いたのがhttpd.confに記載されている
ServerRoot "/xampp/apache"
に合うようにファイルを移動させるでした。今までXamppのファイルは
C:\xampp\xampp\appche
に格納していました。そのためhttpd.confのServerRootの部分も上記の形にしていましたがデフォルトの形に合うようにファイルを設定しなおしました。
その結果
17:54:08 [Apache] Attempting to start Apache app...
17:54:08 [Apache] Status change detected: running
無事、Apacheの起動に成功しました。
ググってもこの答えは見つからなかったので備忘録として残しておきます。
おしまい