Wednesday, 7 August 2013

ReInstalling Apache2

What would definitely not work:

  1. sudo apt-get uninstall apache2
  2. sudo apt-get autoremove --purge
Check:

vishu@vishu-Lenovo-G470 ~$ whereis apache2
Console o/p:
--------------------------------------------------------------------------------------------------------
apache2: /usr/sbin/apache2 /etc/apache2 /usr/lib/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz
--------------------------------------------------------------------------------------------------------
the night is longer my friend....

What may seem to work but would not work:

Astute readers may go to the above mentioned directories and delete these files. So go and try and come back if you fail ..........

If you are still with me try deleting apache2 folder under /etc/var/ .............. and come back
 
Check2:

vishu@vishu-Lenovo-G470 ~$ whereis apache2
Console:
--------------------------------------------------------------------------------------------------------
apache2:
--------------------------------------------------------------------------------------------------------

Is this a victory??? have you successfully removed apache2
???????? 

Holdon,try this:
vishu@vishu-Lenovo-G470 ~$ sudo pgrep -f 'apache2' 

Do you see random 4 digit numbers ?? this means the work is yet not finish. Hit enter vociferously and relax.

What may work:
  • sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common 
    apache2-mpm-prefork 
    apache2-mpm-worker
  • sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2.2-common



What definitely works:
  • sudo service apache2 stop
  • sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common 
    apache2-mpm-prefork 
    apache2-mpm-worker
  • sudo apt-get autoremove --purge
  • sudo apt-get install apache2
FinalCheck:
now open your browser and enter:

This would display the index.html placed in your /var/www folder.







No comments:

Post a Comment