0

I am attempting setting up my raspberry pi to be a web server. I have just installed it today, so it is on latest configuration. I have gone with apache2. I have read that if entering my computer's ip address into chrome does not pull up the sample page, I should use the linux command

sudo service apache2 start

However, when I try getting the code to run, I get the following message:

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

I then open the first file it asks me to check, and this is what pulls up:

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'.

I am not quite sure I have installed the apache files correctly.

1
/usr/sbin/apache2: not found

Obviously the file does not exist. Usually one would expect the distribution to provide suitable unit files. Maybe you did not install Apache the way it is intended to be done? You may check the installed files (dpkg-query --listfiles apache2) and create a correct unit file.

  • Ok, I FINALLY got it to work. – Caleb Evans Apr 4 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.