Answer the question
In order to leave comments, you need to log in
How to update nginx and save all settings?
Hello.
Can you please tell me how to upgrade to the latest version of nginx "on the fly" on the working server and at the same time save all the web server settings (sites, domains, configs, etc.)?
Ubuntu OS
Thank you.
Answer the question
In order to leave comments, you need to log in
apt-get update && apt-get install nginx -y will
only update nginx
Or did you build from source?
When updating, nginx does not touch the current configs, but puts new ones next to or in the directory with examples. This time. Nginx has a killer feature for updating the binary on the fly. This is two. Choose.
You can use git.
1) prepare the repository:
$ cd /etc/nginx
$ git init . && git add . && git commit -m initial
# debian/ubuntu
$ apt-get update && apt-get install nginx
# redhat/centos
$ yum install nginx
$ git diff
$ git add nginx.conf && git commit -m updated
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question