Ubuntu – apache2 not starting after purge and re-install


First of all – I have looked and tried several approaches including

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

Best Answer

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
Related Question