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