S
S
serious9112015-04-15 22:43:48
linux
serious911, 2015-04-15 22:43:48

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

4 answer(s)
N
n1mda, 2015-04-15
@serious911

apt-get update && apt-get install nginx -y will
only update nginx
Or did you build from source?

P
polozad, 2015-04-16
@polozad

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.

N
Nikolai, 2015-04-16
@jaymecd

You can use git.
1) prepare the repository:

$ cd /etc/nginx 
$ git init . && git add . && git commit -m initial

2) update nginx:
# debian/ubuntu
$ apt-get update && apt-get install nginx

# redhat/centos
$ yum install nginx

3) look at the changes and commit the necessary:
$ git diff 
$ git add nginx.conf && git commit -m updated

A
AVKor, 2015-04-15
@AVKor

-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question