from inside the box, copy the symlinks: mkdir /tmp/backup sudo cp /etc/nginx/sites-enabled/* /tmp/backup then install your service then again, from inside your box: sudo cp /tmp/backup/* /etc/nginx/sites-enabled/