-1

I use ubuntu 16.04. I have removed nginx config

$ sudo rm -rvf /etc/nginx/

purged nginx and installed it again

# apt-get remove --purge nginx
# apt install nginx

aptitude shows nginx installed

aptitude search nginx

p   lua-nginx-websocket                                - Lua websocket client driver for the nginx embedded Lua langu
i   nginx                                              - small, powerful, scalable web/proxy server                  
v   nginx:i386                                         -                                                             
i A nginx-common                                       - small, powerful, scalable web/proxy server - common files   
i A nginx-core                                         - nginx web/proxy server (core version)                       
p   nginx-core:i386                                    - nginx web/proxy server (core version)                       

but command # ls /etc/n* shows no nginx config files installed?

what is going on?


following this page: https://askubuntu.com/questions/361902/how-to-install-nginx-after-removed-it-manually

I have removed nginx and installed again. while installing i got following warnings.

Selecting previously unselected package nginx.
dpkg: warning: files list file for package 'nginx-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'nginx-core' missing; assuming package has no files currently installed
  • solved --- askubuntu.com/questions/361902/… says at the end So if you want to recreate the /etc/nginx files, you should do: > apt-get install --reinstall nginx-common – ruby_object Jun 22 '16 at 8:51
  • If you have the solution, please post it as an answer, not as a comment. It would help other people with the same problem. – Jenny D Jun 22 '16 at 8:58
0

So if you want to recreate the /etc/nginx files, you should do:

sudo apt-get install --reinstall nginx-common

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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