Uninstallation and reloading of Ubuntu under Nginx

Source: Internet
Author: User

Because I put my server's nginx to play bad, have to choose Uninstall Reinstall, (Let me cry for a while)

Then I deleted/usr/sbin/nginx and/etc/nginx and/usr/share/nginx and/usr/share/man/man1/nginx.1.gz's folders.

Then go back and reload the command: Apt-get install Nginx

Found always reported:

Nginx is already the newest version.
0 upgraded, 0 newly installed, 0 to-remove and not upgraded.

The meaning is that nginx already exists or has not been deleted. There may be some configuration of something, anyway, we did not delete the Nginx

Then I went to the internet to find a lot of information, most of them are said to delete those folders can be,

For me, however, there is no egg to use. All right! Continue on the online early solution, find one I try one. Then we find the following method:

Rm-rf/etc/nginxrm-rf/usr/sbin/nginxrm/usr/share/man/man1/nginx.1.gzapt-get Remove nginx* (apt-get remove--purge ngi NX) sudo apt-get remove nginx #Removes all but config Files.sudo apt-get purge nginx #Removes everything. Reference: Http://articles.slicehost.com/2007/12/3/ubuntu-gutsy-installing-nginx-from-source

Reinstall:

To recreate it, first uninstall using purge to remove even configuration files and records:

apt-get purge nginx nginx-common nginx-full

Then reinstall:

apt-get install nginx

If above doesn ' t work for you

You can also try using--force-confmiss option of dpkg.

sudo dpkg--force-confmiss-i/var/cache/apt/archives/nginx-common_*.deb

Reference: Http://stackoverflow.com/questions/12362967/how-can-i-restore-etc-nginx My problem is to follow the above solution, thanks to the Almighty network

Uninstallation and reloading of Ubuntu under Nginx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.