컴퓨터에서 apache2 httpd 웹 서버를 실행하는 중에 오류가 발생했습니다.

컴퓨터에서 apache2 httpd 웹 서버를 실행하는 중에 오류가 발생했습니다.

Raspberry Pi를 웹 서버로 설정하려고 합니다. 오늘 방금 설치해서 최신상태네요. 나는 apache2를 사용했다. 내 컴퓨터의 IP 주소를 크롬에 입력해도 샘플 페이지가 표시되지 않으면 linux 명령을 사용해야 한다는 내용을 읽었습니다.

sudo service apache2 start

그러나 코드를 실행하려고 하면 다음 메시지가 나타납니다.

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

그런 다음 확인을 요청한 첫 번째 파일을 열었고 결과는 다음과 같습니다.

Jun 01 18:59:27 raspberrypi systemd[1]: Starting The Apache HTTP Server...
Jun 01 18:59:27 raspberrypi apachectl[6989]: /usr/sbin/apachectl: 174: /usr/sbin/apachectl: /usr/sbin/apachectl: /usr/sbin/apache2: not found
Jun 01 18:59:27 raspberrypi apachectl[6989]: Action 'start' failed.
Jun 01 18:59:27 raspberrypi apachectl[6989]: The Apache error log may have more information.
Jun 01 18:59:27 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited status=127
Jun 01 18:59:27 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
Jun 01 18:59:27 raspberrypi systemd[1]: apache2.service: Unit entered failed state.
Jun 01 18:59:27 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.

아파치 파일을 제대로 설치했는지 잘 모르겠습니다.

답변1

/usr/sbin/apache2: not found

파일이 존재하지 않는 것 같습니다. 일반적으로 배포판에서는 적절한 단위 파일을 제공할 것으로 예상합니다. 어쩌면 예상한 대로 Apache를 설치하지 않았을 수도 있습니다. 설치된 파일( dpkg-query --listfiles apache2)을 확인하여 올바른 유닛 파일을 생성할 수 있습니다.

관련 정보