pjv Is there still a way to update that will not overwrite anything in /etc/nginx but will create the updated configurations with a .orig extension?
VirtuBox it's the new behavior with wo stack upgrade --nginx
Not correct.
I just did wo stack upgrade --nginx
and many live files in the etc/nginx
directory were overwritten. Because I have customized nginx.conf
(and touched nginx.conf.custom
), the changes that were made to remove some things from nginx.conf
and put them into conf.d/gzip.conf
and conf.d/tweaks.conf
caused nginx to:
nginx: [emerg] "gzip" directive is duplicate in /etc/nginx/conf.d/gzip.conf:5
nginx: configuration file /etc/nginx/nginx.conf test failed
nginx: [emerg] "sendfile" directive is duplicate in /etc/nginx/conf.d/tweaks.conf:13
nginx: configuration file /etc/nginx/nginx.conf test failed
...which is exactly what I was hoping to not have happen when I asked all the questions I asked in this thread above.
It was a simple enough matter for me to disable gzip.conf and tweaks.conf and get my sites back online, but now I am going to have to assume that future upgrades will likely break my server.
Unless / until there is a way to really cleanly separate config customizations with variable interpolation as I recommended in a different thread and with some strategic use of the include
directive, I'd like to request bringing back --preserve
and having it really, totally preserve the /etc/nginx
directory by NOT OVERWRITING ANYTHING in there, but instead just writing new files as needed with a .orig
suffix which is what I thought you were saying in your last message quoted above.
...Also, I was thinking about another way to safeguard sites from errant upgrades using git. How about if the nginx upgrade process started by committing any changes to master in the git repo for /etc/nginx
, then make a branch for the upgrade, and then at the end of the upgrade, the user is asked to check that all is well with the server. If they answer yes, merge the branch into master. If they answer no, check out the master branch and reload nginx to effectively (instantly) roll back the upgraded configuration to the known working state.