Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

First of all - I have looked and tried several approaches including 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 127.0.0.1 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

share|improve this question

3 Answers 3

up vote 5 down vote accepted

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
share|improve this answer
    
Thx Dan! I wish I had known this but tasksel did the job for me... –  Aveesh Apr 30 at 19:42

Apache2's binaries are in apache2-bin.

Try:

sudo apt-get --purge remove apache2*
sudo apt-get --purge autoremove
sudo apt-get install apache2
share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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