8

I installed Apache 2 using:

sudo apt-get install Apache2

Then tried to start it with:

sudo service Apache2 start

But ended up with:

Failed to start Apache2.service: Unit Apache2.service not found.

Any help? Thx

2 Answers 2

16

Remember that linux/unix is case-sensitive, so apache2 is not the same as Apache2

Try

sudo apt-get install apache2

Then it should start right after you install it

sudo service apache2 status

If stopped

sudo service apache2 start
3
  • My bad sorry. The service was active the whole time.
    – Adriaan
    Jun 3, 2016 at 20:44
  • ubuntu@ip-172-31-43-224:~$ sudo service apache2 status * apache2 is not running ubuntu@ip-172-31-43-224:~$ sudo service apache2 start * Starting web server apache2 (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.
    – Mona Jalal
    Sep 17, 2017 at 23:56
  • @MonaJalal different issue i think (some other service like nginx using port 80), create another question.
    – bistoco
    Sep 18, 2017 at 1:36
-1

The problem is the upper_case letter being used on your command.

USE: sudo service apache2 status NOT: sudo service Apache2 status

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .