First of all - I have looked and tried several approaches including https://askubuntu.com/questions/94805/apache-server-not-starting/

I am using Ubuntu 14.04 64 bit

I had purged using an answer at serverfault

  • sudo service apache2 stop
  • sudo apt-get --purge remove apache2 sudo apt-get remove apache2-common
  • sudo apt-get autoremove
  • whereis apache2 (gave 3 locations)
  • sudo rm -rf /etc/apache2
  • sudo rm -rf /usr/sbin/apache2
  • sudo rm -rf /usr/lib/apache2

I did

  • sudo apt-get -y install apache2 - says it is the newest version
  • all conf files are in /etc/apache2 /etc/log/apache2/error_log is blank
  • sudo service apache2 restart gives no output - no error - no message
  • http//localhost or say web server not available
  • ps ax | grep -i apache gives 7919 pts/0 S+ 0:00 grep --color=auto -i apache

I am stumped - please help!

Edit - just realized /usr/sbin/apache2 does not exist and neither does /usr/lib/apache2

After 3 re-installs - how do i get them - pleas help - thx

4 Answers 4


In 14.04, the apache binaries are located in apache2-bin.

Since you are missing the binaries, you can try reinstalling that package along with apache2.

sudo apt-get install --reinstall apache2 apache2-bin

Then try starting apache again, (Although I believe apache will auto-start itself after installation)

sudo apache2ctl start
  • Thx Dan! I wish I had known this but tasksel did the job for me...
    – Aveesh
    Apr 30, 2014 at 19:42
  • How asinine. Surely installing apache2 should...install apache2. Thanks, Dan! Very much appreciated. Jun 8, 2015 at 8:20

Apache2's binaries are in apache2-bin.


sudo apt-get --purge remove apache2*
sudo apt-get --purge autoremove
sudo apt-get install apache2
  • i tried it, but had to add the --reinstall in the last command.
    – kiltek
    Apr 5, 2017 at 8:28

thx for responding.

I did try the purge, autoremove and install

It installed file - echo'd a lot of stuff setting up conf and default sites but when i went to localhost - there was no web server

restart did not echo anything but still no webserver

What worked was was purging autoremove and

then sudo-apt-get install tasksel

sudo tasksel

and choosing lamp server

I suspect it had something to do me deleting /usr/sbin/apache2 and /usr/lib/apache2 using whereis apache2 by following blindly

I wish I had known

sudo apt-get install --reinstall apache2 apache2-bin

that probably would have fixed my problem but good to know

Thanks a lot


You need to find the package using

dpkg -S /usr/sbin/apache2

after this, you get the response on the terminal like apache2-bin: /usr/sbin/apache2

then you re-install apache2 dependency apache2-bin

sudo apt install --reinstall apache2-bin

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.